Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update queue:run to run garbage collection #5203

Merged

Conversation

marcaddeo
Copy link
Contributor

This updates the queue:run command to run garbage collection against the
queue if it supports it. If we don't do this, queue items expirations
never actually expire until the next cron run.

This updates the queue:run command to run garbage collection against the
queue if it supports it. If we don't do this, queue items expirations
never actually expire until the next cron run.
@weitzman
Copy link
Member

Why is waiting for the next cron a bad idea? I'm not sure queue running implies garbage collection (i.e. it could be a separate command).

@marcaddeo
Copy link
Contributor Author

@weitzman I'm using a DelayedRequeueException to have my queue item reprocessed in 5 minutes, but we only run cron every 10 minutes.

And then I'm running queue:run <queue name> every minute to ensure my queued items are quickly processed.

I realize I could just run cron more frequently, or instead of queue:run, but this just seemed like strange behavior to me when running queue:run quickly and not having my delayed requeued items process.

Core does queue garbage collection in system_cron before any queue workers are run, so it seemed slightly implied that it would be run for a queue runner to me.

I could see it being a separate queue command as well if you think that's the better route.

@weitzman
Copy link
Member

weitzman commented Sep 3, 2022

Thoughts? @juampynr @davereid @damiankloip and any other queue folks?

@weitzman weitzman changed the base branch from 11.x to 12.x March 23, 2023 04:23
@weitzman weitzman merged commit 7d526c6 into drush-ops:12.x Mar 23, 2023
@weitzman
Copy link
Member

This looks useful and benign so in it goes. Sorry for the big delay.

@juampynr
Copy link
Contributor

Sorry, super late review but still: this looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants