Back in D7 we were able to give a timeout option to the drush command, thus have a poor-man's daemon
https://git.drupalcode.org/project/advancedqueue/-/blob/77719caa069717c9...
Issue is about adding this feature. Is there a reason it was removed, or simply not implemented?
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 3133969-13.patch | 3.37 KB | jcnventura |
| #5 | 3133969-4.patch | 4.23 KB | mlemon |
| #3 | 3133969-3.patch | 4.3 KB | kpa |
Comments
Comment #2
kpa commented[edit] ignore this post - test suite does not pass. See #3.
Comment #3
kpa commentedWe needed this functionality so I've created a patch.
Attached and tested with Drush 9.
Usage:
drush advancedqueue:queue:process queuename --timeout=60where:
-
{queuename}is the id of your queue, as per the queue_id column of the advancedqueue database table, or `id` in the config yml-
--timeout={x}where {x} is a value in seconds. e.g. 60 = one minuteComment #4
r0djer commentedTested. It works as expected.
Comment #5
mlemon commentedRe-rolled patch
Comment #6
jcnventuraThis, according to #4
Comment #8
jcnventuraThanks everyone!
Comment #9
jsacksick commented@jcnventura: Did you really test the patch? Also, please pay attention to the coding standards as they're comments longer than 80 characters for example, empty whitespaces... And I'm suspecting this change to cause #3319627: Upgrading from RC4 to RC5 slows down or stops cron running..
Comment #11
jcnventuraReverted this, as it introduced the following problem from #3319627: Upgrading from RC4 to RC5 slows down or stops cron running.
Comment #12
jcnventuraThis patch should only really use the timeout option to set the processing time and not try to daemonize the queue processor.
Comment #13
jcnventuraModifying #4 this to only set the queue max processing time. Making the processor be idle in the background until that time is reached should be handled in #3275594: Allow processor to keep running when queue gets empty.
Comment #14
jcnventura