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.

CommentFileSizeAuthor
#4 Screenshot from 2017-02-05 08-50-49.png296.4 KBJon Pugh
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jon Pugh created an issue. See original summary.

  • Jon Pugh committed b9ef46e on 2849795-pause-queued
    Issue #2849795: Check a variable before running queued tasks, allowing...

  • Jon Pugh committed d681299 on 2849795-pause-queued
    Issue #2849795: Change hosting queue daemon init message based on paused...
  • Jon Pugh committed e8819ef on 2849795-pause-queued
    Issue #2849795: Add a checkbox to the hosting queue daemon settings page...
Jon Pugh’s picture

Hosting queued logs and settings page.

Screenshot above shows hosting queued logs output showing pausing and unpausing, along with the new checkbox on the hosting queued settings page.

colan’s picture

I didn't test it, but it's a great idea and the code looks good.

  • helmo committed c5d29e1 on 2849795-pause-queued
    Issue #2849795: Fix whitespace
    
helmo’s picture

Status: Needs review » Reviewed & tested by the community

Tried and works as expected.

I just added a commit to cleanup some whitespace ;)

Jon Pugh’s picture

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

  • Jon Pugh committed b9ef46e on 7.x-3.x
    Issue #2849795: Check a variable before running queued tasks, allowing...
  • helmo committed c5d29e1 on 7.x-3.x
    Issue #2849795: Fix whitespace
    
  • Jon Pugh committed d681299 on 7.x-3.x
    Issue #2849795: Change hosting queue daemon init message based on paused...
  • Jon Pugh committed e8819ef on 7.x-3.x
    Issue #2849795: Add a checkbox to the hosting queue daemon settings page...
helmo’s picture

Status: Reviewed & tested by the community » Fixed

Merged ... +1 to add a message as per #8

Status: Fixed » Closed (fixed)

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