Laravel

[Laravel] Queue 명령어

먹세 2022. 2. 15. 20:04
php artisan list

 queue
  queue:failed                List all of the failed queue jobs
  queue:failed-table          Create a migration for the failed queue jobs database table
  queue:flush                 Flush all of the failed queue jobs
  queue:forget                Delete a failed queue job
  queue:listen                Listen to a given queue
  queue:restart               Restart queue worker daemons after their current job
  queue:retry                 Retry a failed queue job
  queue:table                 Create a migration for the queue jobs database table
  queue:work                  Start processing jobs on the queue as a daemon

 

실패한 job 확인

php artisan queue:failed

 

실패한 job 모두 삭제

php artisan queue:flush

 

현재 실행중인 job을 모두 실행한 후 worker 종료

해당 명령어 실행 후 worker를 직접 구동해줘야 함

또는 Supervisor와 같은 프로세스 매니저 사용

php artisan queue:restart

 

실패한 job 재실행

php artisan queue:retry all

 

worker 실행 (종료시까지 계속 실행)

php artisan queue:work
반응형