Skip to content

Conversation

@themsaid
Copy link
Member

This command removes stale records from the failed_jobs database table. You can pass an --hours option with the number of hours to retain jobs data

@netpok
Copy link
Contributor

netpok commented Jun 15, 2021

Shouldn't be better to show an error message and exit with a non-zero return code if the provider does not support pruning instead of silently failing?

@wouterrutgers
Copy link
Contributor

wouterrutgers commented Jun 30, 2021

May I ask what the difference is with the queue:flush command? Except for the limit parameter, which is only available in 9.X.

But that would mean, as far as I can tell, that from 9.X onwards there are 2 commands which will do identical things. What am I missing 😜?

@themsaid
Copy link
Member Author

themsaid commented Jul 1, 2021

@wouter2203 flush removes everything while prune keeps the latest records.

@wouterrutgers
Copy link
Contributor

@themsaid Ah, my bad, didn't notice the default of 24 hours to keep!

This was referenced Aug 20, 2021
@bryceandy
Copy link

2 commands which will do identical things

There was a PR before this where flush uses an age option:

php artisan queue:flush --age=30
// Failed jobs older than 30 days

php artisan queue:prune-failed --hours=30
// Failed jobs older than 30 hours

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants