I've struggled with getting Aegir tests to run easily locally and on Travis because there is a battle between the hosting-queued command and behat running drush hosting-tasks directly.
I've figured out how to let hosting-queued command "pause" and unpause by checking for a variable.
On each while loop, we check a variable before loading and running tasks.
If the state changes, it shows a message: "Hosting Queued has been paused." "Hosting Queued has been unpaused."
This will allow much easier local aegir development and testing, as well provides us an easy way to stop a running queue daemon.
I don't know if we need a Settings UI for pausing the queue or not. A drush "variable_set" works for now.
Comment | File | Size | Author |
---|---|---|---|
#4 | Screenshot from 2017-02-05 08-50-49.png | 296.4 KB | Jon Pugh |
Comments
Comment #4
Jon PughScreenshot above shows hosting queued logs output showing pausing and unpausing, along with the new checkbox on the hosting queued settings page.
Comment #5
colanI didn't test it, but it's a great idea and the code looks good.
Comment #7
helmo CreditAttribution: helmo at Initfour websolutions, Aegir Cooperative commentedTried and works as expected.
I just added a commit to cleanup some whitespace ;)
Comment #8
Jon PughWe might want to add some message to the tasks logs and node page.
I know when I see a task not runningi think something is wrong with the system.
Comment #10
helmo CreditAttribution: helmo at Initfour websolutions, Aegir Cooperative commentedMerged ... +1 to add a message as per #8