The link between the celery background task and StateIO instance -- sio -- that is used to manage an export/import is one-way: the task will update sio, but only on successful completion.
Two problems with this:
cannot stop the celery task via the sio
if celery task fails, does not update sio to finished or failed status
Proposing
adding CombineBackgroundTask id to sio, such that it's aware enough to stop task
adding try/except blocks to celery tasks such that failures update proper models
The link between the celery background task and
StateIO
instance --sio
-- that is used to manage an export/import is one-way: the task will updatesio
, but only on successful completion.Two problems with this:
sio
sio
tofinished
orfailed
statusProposing
CombineBackgroundTask
id tosio
, such that it's aware enough to stop task