You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With this example from minrk it is possible to requeue a stopped given task:
fromIPython.parallelimportClientfromIPython.parallel.utilsimportunpack_apply_messagerc=Client()
view=rc.load_balanced_view()
# get the buffers from the Hubrec=rc.db_query(dict(msg_id=msg_id), keys=['buffers'])[0]
# reconstruct the argumentsf,args,kwargs=unpack_apply_message(rec['buffers'])
# resubmitview.apply_async(f,*args,**kwargs)
However this will create a new task because it submits a copy with the same contents. If you don't want to keep old stopped tasks after you requeued them, you'll have to delete them with purge_results(msg_id).
Is there a way to keep the old tasks and just set their status to 'pending' again?
The text was updated successfully, but these errors were encountered:
I went ahead and implemented a resubmit method as part of #413. If you check out that branch, you can see if it provides what you need. Pass one or more msg_ids, and the task(s) will be re-run from the Hub. No client-level db shenanigans necessary.
With this example from minrk it is possible to requeue a stopped given task:
However this will create a new task because it submits a copy with the same contents. If you don't want to keep old stopped tasks after you requeued them, you'll have to delete them with purge_results(msg_id).
Is there a way to keep the old tasks and just set their status to 'pending' again?
The text was updated successfully, but these errors were encountered: