You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to delay a job from running from a Stripe webhook (e.g., 30 seconds) to avoid a potential race condition.
I tried the following in the beginning of the job:
public function handle(): void
{
sleep(15);
and
public function handle(): void
{
$this->delay(15);
The sleep() command causes the job to fail with
lluminate\Database\Eloquent\ModelNotFoundException: No query results for model [Spatie\WebhookClient\Models\WebhookCall]. in /home/forge/dev.boothcentral.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:527
The delay() does not do anything. The job just ran immediately. Is there a way to delay a job from running, preferably in the config/stripe-webhooks.php file?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to delay a job from running from a Stripe webhook (e.g., 30 seconds) to avoid a potential race condition.
I tried the following in the beginning of the job:
and
The sleep() command causes the job to fail with
The delay() does not do anything. The job just ran immediately. Is there a way to delay a job from running, preferably in the config/stripe-webhooks.php file?
Beta Was this translation helpful? Give feedback.
All reactions