You are here

Aegir queue runner

When using Aegir the tasks queue is executed once every minute when cron runs with the queue runner module and daemon the queue tasks will be run at once. Start by downloading the module into the hostmaster site and enable the module, which can be done using drush.

~$ cd hostmaster-6.x-1.4
~$ drush dl hosting_queue_runner
~$ drush en hosting_queue_runner -y -l <aegir site name>

The daemon can be installed in two ways I prefer to install the Supervisor daemon, which ensures to restart the queue runner if it should crash.

~$ apt-get install supervisor
~$ su -s /bin/bash - aegir
~$ chmod o+x hostmaster-6.x-1.4/sites/all/modules/hosting_queue_runner/hosting_queue_runner.sh
~$ exit
~$ cp /home/www/aegir/hostmaster-6.x-1.4/sites/all/modules/hosting_queue_runner/hosting_queue_runner.conf /etc/supervisor/conf.d/

Edit the hosting_queue_runner.conf file you just copied and update edit with the right paths that matches your aegir installation.

[program:hosting_queue_runner]
; Adjust the next line to point to where you copied the script.
command=/home/www/aegir/hostmaster-6.x-1.4/sites/all/modules/hosting_queue_runner/hosting_queue_runner.sh
user=aegir
numprocs=1
stdout_logfile=/var/log/hosting_queue_runner
autostart=TRUE
autorestart=TRUE
; Tweak the next line to match your environment.
environment=HOME="/home/www/aegir",USER="aegir",DRUSH_COMMAND="/opt/drush/drush"

Restart the supervisor daemon to get it to read the newly copied configuration file after this the tasks in the queue should be run at once.

~$ /etc/init.d/supervisor stop
~$ /etc/init.d/supervisor start

Tags

Drupal aegir queue runner server

Add new comment