Download & Extend

tasks should be removed from the queue when started, not bootstrapped

Project:Hosting
Version:6.x-0.4-alpha1
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

Comments

#1

Status:active» needs review

Is 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

AttachmentSize
593536_task_queue_removal.patch 1.31 KB

#2

Status:needs review» needs work

The 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.

#3

Status:needs work» needs review

Think this is ok?

AttachmentSize
593536_task_queue_removal_1.patch 497 bytes

#4

Status:needs review» needs work

Not quite: that doesn't actually remove the task...

#5

Status:needs work» fixed

I implemented a fix in CVS: basically, I moved the task edition completely in the queue dispatcher.

#6

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here