Bugify runs potentially slow tasks as a job (asynchronously). We do this to prevent holding up the interface, so we can keep Bugify feeling snappy (a slow SMTP server would make the interface grind to a halt if we were sending lots of email notifications inline).
Up until now, we were using PHP-CLI to run these tasks. This works fantastically for most people, but every now and then it causes a major headache for a new customer. Some web hosts have the PHP-CLI binary installed in an odd place, and Bugify has trouble figuring out where it is. PHP (when running as an Apache module, or PHP-CGI) knows nothing about the PHP-CLI binary, so we can’t ask PHP where it lives, and we need to know the full path to the PHP-CLI binary in order to use it (otherwise PHP-CGI might run the script and cause all sorts of havoc). So, after a lot of pain trying to make working with PHP-CLI work for everyone, we have decided to change tactics.
From the next version of Bugify, queue jobs will be run using an Ajax request. 3 seconds after loading any page in Bugify (after logging in), the queue will be run. 10 seconds later (and every 10 seconds after that) the queue will be run again. Only a small number of jobs will be run per Ajax request, so if the jobs aren’t cleared in the first run, they will be processed in the next. This has been working very well for us, and you shouldn’t notice any difference.
Some of you may have realised that this isn’t going to work for API requests – there is no Ajax involved. The way we’re dealing with this is to give you the option of manually triggering the queue (by a new API method), or having the queue tasks run inline (as part of the API request). By default, the queue will be run inline, but you can change it in settings.
The slowest queue task is usually sending notification emails. For small teams where a change may only generate a few email notifications, the API requests should still be very snappy (even when running queue tasks inline). If a change generally sends notification emails to more than 10 people, you might want to look at using the new API method to trigger the queue, rather than allowing the queue to run inline. When the update is released, we’ll also update the API Explorer so you can see how the new method works.