Created
September 30, 2024 18:28
-
-
Save Braunson/f1f2759d9205fa50387ab2878e9dd1d9 to your computer and use it in GitHub Desktop.
Retry all (or a ton of) failed jobs in Laravel. If you want to use this in Laravel sail run this command inside your laravel.test container.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source .env | |
mysql -N --raw --batch \ | |
-h"${DB_HOST}" -u"${DB_USERNAME}" -p"${DB_PASSWORD}" "${DB_DATABASE}" \ | |
-e "SELECT uuid FROM failed_jobs ORDER BY id DESC LIMIT 100000" | \ | |
xargs -P 4 -n 100 php /var/www/html/artisan queue:retry |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment