the best pattern here is to add an
on_finish hook to the task that produces the data. inside the hook, you can call the mongodb driver and upload the data. alternatively, you may embed the uploading logic within the task itself, but I think a hook is cleaner