When I cancel a task and I'm using hosting_queued, it's stuck. Even deleting the row in semaphore won't get it started again.

I have to restart the queue process to get it running again

Comments

Jon Pugh created an issue. See original summary.

Jon Pugh’s picture

Title: Cancelling a task stalls the queue because the semaphor is still present. » Cancelling a task stalls the queue even if the semaphor is still present.
helmo’s picture

This happens when the task is already running? or even when it's just queued?

Jon Pugh’s picture

Now you can see the tasks starting and stopping in the logs. If you Cancel a task before it completes, you never see the "Finished task" message.

The code reporting those messages is in hosting_task_execute()

helmo’s picture

How are you even canceling a task that's already running? In hosting_task_cancel() it specifically filters on HOSTING_TASK_QUEUED.

Jon Pugh’s picture

Title: Cancelling a task stalls the queue even if the semaphor is still present. » "Update Status" button does not remove hosting queued semaphore, stalling the queue

Sorry, I mean the "Update Status" button, which works on running tasks.

I think the problem is that the hosting.module form isn't aware of hosting_queued, so it doesn't remove the lock?

Not sure. Perhaps the fix should be in hosting_queued()