Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: kpa at Big Blue Door commented[edit] ignore this post - test suite does not pass. See #3.
Comment #3
kpa CreditAttribution: kpa at Big Blue Door commentedWe needed this functionality so I've created a patch.
Attached and tested with Drush 9.
Usage:
drush advancedqueue:queue:process queuename --timeout=60
where:
-
{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 CreditAttribution: R0djer commentedTested. It works as expected.
Comment #5
mlemon CreditAttribution: mlemon commentedRe-rolled patch
Comment #6
jcnventura CreditAttribution: jcnventura at 1xINTERNET commentedThis, according to #4
Comment #8
jcnventura CreditAttribution: jcnventura at 1xINTERNET commentedThanks everyone!
Comment #9
jsacksick CreditAttribution: jsacksick at Centarro 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
jcnventura CreditAttribution: jcnventura at 1xINTERNET commentedReverted this, as it introduced the following problem from #3319627: Upgrading from RC4 to RC5 slows down or stops cron running.
Comment #12
jcnventura CreditAttribution: jcnventura at 1xINTERNET commentedThis patch should only really use the timeout option to set the processing time and not try to daemonize the queue processor.
Comment #13
jcnventura CreditAttribution: jcnventura at 1xINTERNET commentedModifying #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 CreditAttribution: jcnventura at 1xINTERNET commented