Skip to content

[11.x] Add limit option to the queue failed command #53827

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

Conversation

kevinb1989
Copy link
Contributor

@kevinb1989 kevinb1989 commented Dec 10, 2024

I find the php artisan queue:failed valuable. I can quickly check the latest failed jobs from the terminal.

Plus, for projects using NoSQL databases, we have to use the file driver to store failed jobs, it would be a bit easier to see the latest failed jobs from the terminal.

In development environments, we can have hundreds of failed jobs. This number in staging and production environments could be thousands. This command will retrieve all the failed jobs and go all the way down to the oldest ones. That makes this command mostly unusable.

A simple limit option is gonna help. Most of the time we are only interested in a handful of latest failed jobs.

I have symlinked this feature branch to a test Laravel project, the results are as below:

Screenshot 2024-12-10 at 9 53 34 PM

Currently I am not skilled enough with DynamoDb to implement the limit method. This could be done later.

@taylorotwell
Copy link
Member

I think this is OK but we probably need a more robust solution to this in production cases, either via Horizon or the incoming Nightwatch. This is not going to be that useful when jobs are coming in quite quickly.

@kevinb1989
Copy link
Contributor Author

No problem.

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.

2 participants