Currently, tasks remove themselves from the queue when they start. That's a problem if you start "hosting tasks" repeatedly or too quickly: the tasks will not have time to bootstrap properly and clear their status before the next time you run "hosting tasks".
I would expect the tasks dispatcher to change the status of the task when forking it and not expect the task itself to do it.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 593536_task_queue_removal_1.patch | 497 bytes | mig5 |
| #1 | 593536_task_queue_removal.patch | 1.31 KB | mig5 |
Comments
Comment #1
Anonymous (not verified) commentedIs it enough to move this into hosting.queues.inc in hosting_tasks_queue() just before the drush_backend_fork, away from drush_hosting_hosting_task_validate() in task.hosting.inc ?
Everything seems to still work, but I may misunderstand the problem and this might not be the solution. Please review the patch or checkout my relevant git branch
Comment #2
anarcat commentedThe problem with this patch is that it stops saving the task when starting (second chunk), and will create a new revision when dispatching (first chunk).
The proper fix is to set revision= false in both places and keep the save in the second chunk.
Comment #3
Anonymous (not verified) commentedThink this is ok?
Comment #4
anarcat commentedNot quite: that doesn't actually remove the task...
Comment #5
anarcat commentedI implemented a fix in CVS: basically, I moved the task edition completely in the queue dispatcher.