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.
In drupal core D7 queues are defined using hook_cron_queue_info, which is called by drupal_cron_run.
There is no way for a queue to avoid being run during cron run, at least not until #2136369: Provide a way to avoid processing a queue during cron execution in D7.
Comment | File | Size | Author |
---|---|---|---|
#4 | 0001-Issue-2136375-Do-not-run-versioncontrol-queues-on-cr.patch | 1.3 KB | marvil07 |
Comments
Comment #1
marvil07 CreditAttribution: marvil07 commentedHere Sam's workaround.
I tested basic behavior and it seems to be working fine, but I had a local problem that is unrelated and therefore could not test it completely.
I'd like to do a full test before adding it.
Comment #2
marvil07 CreditAttribution: marvil07 commentedThis could be done in the alter hook from drupalorg, since this is specific for drupal.org
Comment #3
sdboyer CreditAttribution: sdboyer commentedi thought about doing it in the alter, but it's actually not d.o-specific. we have a separate point of ingress for synchronization on cron, and if that's what's wanted, then that's what should be configured. syncs are potentially heavy-duty, and shouldn't be conflated with normal cron activities; if someone really wants them processed cron-style rather than select()-ishly, then they can set up a cronjob to drain the queue directly. it's not like we have to support shared hosting situations - if you have access to making git repos, i'm pretty sure you'll have access to set up a cronjob.
i guess now i just need to figure out how i can test this on git7, and we'll be good.
Comment #4
marvil07 CreditAttribution: marvil07 commentedCore accepted #2136369: Provide a way to avoid processing a queue during cron execution, so I am adding a new patch to make versioncontrol require core 7.25 and using the new queue info key to avoid cron processing.
@sdboyer: do you want to test it? if not I'll add it after the weekend.
Comment #5
marvil07 CreditAttribution: marvil07 commentedAdded last patch to 7.x-1.x.
Comment #6
marvil07 CreditAttribution: marvil07 commentedComment #7
sdboyer CreditAttribution: sdboyer commentedwe just deployed #1 to d.o, which'll stopgap until we have a 7.25 core