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

Delayed Dispatching #63

Closed
AlbertoSinigaglia opened this issue May 24, 2020 · 2 comments
Closed

Delayed Dispatching #63

AlbertoSinigaglia opened this issue May 24, 2020 · 2 comments

Comments

@AlbertoSinigaglia
Copy link

Hi,
I was lookig at the package configuration for the past 15 minutes, but I'm no table to find how to postpone the jobs for example for 5 minutes, is there a way to do it?

Thank you
PS: i've also checked the old issues but found nothing like this

Referring to https://laravel.com/docs/7.x/queues#delayed-dispatching

@AlbertoSinigaglia
Copy link
Author

AlbertoSinigaglia commented May 24, 2020

I may have solved this problem in this way

class MyWebhookJob extends SpatieProcessWebhookJob
{
    public function __construct(WebhookCall $webhookCall)
    {
        parent::__construct($webhookCall);
        $this->delay(now()->addMinutes(10));
    }
}

Can you please confirm if this is the right way to do it?

@freekmurze
Copy link
Member

Seems like a good way to go about it.

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

2 participants