December 7, 2016 —John Koster
The queue:forget
command is used to remove a single failed queue job entry from the failed_jobs
database table. The command accepts the id
of the job to remove as its only argument. The following example demonstrates the usage of the queue:forget
command:
1# Remove a single job from the failed jobs table.2php artisan queue:forget 1
If the command was successful in removing the job it will output Failed job deleted successfully!
; No failed job matches the given ID.
will be displayed on failure.
It accomplishes this by calling the forget
method on the configured Illuminate\Queue\Failed\FailedJobProviderInterface
instance (this interface is bound to the key queue.failed
in the service container; this returns an instance of Illuminate\Queue\Failed\DatabaseFailedJobProvider
by default). The following PHP method call is equivalent:
1// Remove a single job from the failed jobs table.2app('queue.failed')->forget(1);
∎
The following amazing people help support this site and my open source projects ♥️
If you're interesting in supporting my work and want to show up on this list, check out my GitHub Sponsors Profile.