In Issue #64, we implemented the
drupal aegir:validate_queue command (see commits
along with some testing/debugging mechanisms currently living alongside the
“Check connection settings” page (
admin/aegir/queue), called “Check task
queue”. It works like this:
queue_valid. Here again, we’ve implemented both a
dispatcherd.queue_valid] routine for each of the workers, and they are triggered in turn. Both use the same technique: set a State API variable to
FALSEinitially, then call the worker task whose job is to end up setting that same variable to
TRUE. After posting the task, the submit handler currently polls the State variable (resetting the cache each time through the wait loop), and returns TRUE when the State variable changes, or FALSE if it times out.
relayd.queue_validtask, we simply call
drupal aegir:queue_validimmediately, validating that we can have the Python Celery task code call out to a
drupal aegircommand, in turn feeding data back to the frontend Aegir site.
dispatcherd.queue_validtask, we emulate the “round trip” feedback mechanism, where a backend task in turn posts a Celery task onto the queue for
relaydto pick up and process (generally via a
drupal aegirconsole command). In this case, we
relayd.validate_queue, which in turn calls the
drupal aegir:queue_validcommand, just as in the previous step.