FlushFailedCommand.php 617B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Illuminate\Queue\Console;
  3. use Illuminate\Console\Command;
  4. class FlushFailedCommand extends Command
  5. {
  6. /**
  7. * The console command name.
  8. *
  9. * @var string
  10. */
  11. protected $name = 'queue:flush';
  12. /**
  13. * The console command description.
  14. *
  15. * @var string
  16. */
  17. protected $description = 'Flush all of the failed queue jobs';
  18. /**
  19. * Execute the console command.
  20. *
  21. * @return void
  22. */
  23. public function handle()
  24. {
  25. $this->laravel['queue.failer']->flush();
  26. $this->info('All failed jobs deleted successfully!');
  27. }
  28. }