Skip to content
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

Manual failing or release job #158

Closed
robert-abram opened this issue Jan 20, 2022 · 1 comment
Closed

Manual failing or release job #158

robert-abram opened this issue Jan 20, 2022 · 1 comment

Comments

@robert-abram
Copy link

Helo,
How to manual fail or release job. Using laravel job, we can use in handle method

$this->fail(); or $this->release();

https://laravel.com/docs/8.x/queues#manually-releasing-a-job

@travisaustin
Copy link
Contributor

Try this:

class ExampleJobThatAlwaysFails
{

    use AsAction;

    public function asJob(JobDecorator $job)
    {
        $job->fail(); // or $job->release();
    }
}

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

No branches or pull requests

3 participants