i have django app pushes config network devices using netmiko. use celery task actual work, retries necessary , update django model instances task's progress. there's view shows user current state of tasks. tasks come in sets (one change => several devices), i'd report @ change level on success - 1 device won't respond others will.
i thought use chords in celery this, , got far as:
for d in devices: pd = deviceconfigpush(d.task_info) subtasks.append(pd.s(task_info)) master = masterconfigpush() ch = chord(header=subtasks, body=master.s().set(link_error=['push_ssh_task_master'])) ch.delay()
which works, master task (the body of chord) gets called either list of results if successful, or uuid if failed. hoping ['result', 'result', none, 'result']. can't see in flower matches uuid passed in fail situation.
so: 1) significance of uuid? 2) how can body task access results of header tasks, regardless?
Comments
Post a Comment