Questions tagged [laravel-queue]

Laravel queues provide a unified API across a variety of different queue backends, such as Beanstalk, Amazon SQS, Redis, or even a relational database. Queues allow you to defer the processing of a time-consuming task, such as sending an email, until a later time, drastically speeding up web requests to your application.

Laravel queues provide a unified API across a variety of different queue backends, such as Beanstalk, Amazon SQS, Redis, or even a relational database. Queues allow you to defer the processing of a time-consuming task, such as sending an email, until a later time, drastically speeding up web requests to your application.

448 questions
4
votes
1 answer

Laravel Notifications - delay email sending and cancel if condition met

I have an app where I am sending a push notification which is fine if the user is logged into the application - however, if they're not / if they have not read the notification within X minutes I'd like to send them an email. The way I am going…
Chris
  • 1,939
  • 1
  • 19
  • 38
4
votes
2 answers

Retry a MaxAttemptsExceededException Job

I have multiple failed jobs on by failed_jobs. I tried requeue the MaxAttemptsExceededException but alwails fails. How to retry there type of jobs? Note: Every time that I requeuing the job by php artisan queue:retry id command the jobs fails…
Miguel Borges
  • 7,549
  • 8
  • 39
  • 57
4
votes
2 answers

Laravel 5.5 - Notifications are not being queued?

I have the following notification class: use Illuminate\Bus\Queueable; use Illuminate\Notifications\Notification; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; class ConfirmEmailNotification extends…
adam78
  • 9,668
  • 24
  • 96
  • 207
4
votes
2 answers

Send error report to sentry within Laravel queue

I have Sentry.io set-up on my Laravel project. I'm also using Queues. I was wondering if it was possible to send failed queues to Sentry? As they don't automatically send when they fail.
4
votes
1 answer

Why does a long running Python script called from PHP fail

I have a Python script which converts a PDF file. It is called via PHP in my Laravel app: $command = escapeshellcmd("python /home/forge/default/pdf.py " . $id); $output = shell_exec($command); This works fine with any PDF up to 250MB, but fails…
samiles
  • 3,768
  • 12
  • 44
  • 71
4
votes
3 answers

Confused about Laravel 5 Queue for Sending Mail (Laravel 5.4)

I upgrade from Laravel 4.1 to 5.4. Queue migration is difficult. Firstly, I commented out iron route from routes: Route::post('queue/receive', function() { return Queue::marshal(); }); Then, I configured database driver and migrated jobs…
horse
  • 707
  • 4
  • 11
  • 30
4
votes
1 answer

Laravel queue job fails saying Undefined property but job runs fine without queue?

I am working on a queue job which imports some data from other APIs and stores them. From my controller, when I say $this->dispatchNow(new ImportPatentsJob($numbers, $count, $invention_id, $redisId));, it works all fine and the process goes through…
Rohan
  • 13,308
  • 21
  • 81
  • 154
4
votes
2 answers

Laravel 5.1 Queue jobs $this->delete() not work

I'm useing Laravel 5.1 and it built in Queue service (with Redis driver). the queue listener look like this: php artisan queue:listen --tries=5 --delay=60 redis In the job class itself I check the response and in case it is a positive response I…
benjah
  • 613
  • 7
  • 29
3
votes
0 answers

Laravel Queue Worker Identification

I've created a simple laravel queue, a controller with a method which dispatches jobs into the queue, and a job for handling logic. My plan is to have multiple queue workers using Supervisor config. And it works fine. Supervisor…
Skywarth
  • 623
  • 2
  • 9
  • 26
3
votes
2 answers

Clarification for afterCommit in Laravel Queues

I am dispatching jobs that perform time consuming tasks when I receive a request. e.g. Send the user a welcome email when they sign up on the site The request however dispatches the email job within a transaction and a race condition occurs. The job…
otaku
  • 849
  • 2
  • 13
  • 33
3
votes
1 answer

Check how many Jobs are processed in one second?

I'm trying to implement Rate Limiting using Redis. I need to call an API that has TPS 100 or that can be called 100 times in every second. I've a limitation that I cannot call API for testing. How can I test that my API is called not more than 100…
Najmus Sakib
  • 737
  • 8
  • 12
3
votes
0 answers

Using Laravel Horizon to orchestrate queue in multiple servers

I have a Laravel app that does video processing. I am currently doing the encoding in the same server. Now, I want to create 3 more servers to do the "encoding" in parallel in multiple servers. Is this possible multiple servers doing the same…
senty
  • 12,385
  • 28
  • 130
  • 260
3
votes
1 answer

How to solve Exception Serialization of 'Illuminate\Http\UploadedFile' is not allowed?

I need help to solve this error Exception Serialization of 'Illuminate\Http\UploadedFile' is not allowed I am using events and listeners. I wanna save a title, description and a photo. I think , the problem is the photo! public function…
brian
  • 41
  • 1
  • 4
3
votes
1 answer

Why Laravel uses the default queue connection even if I specified a queue with different connection

I have problem with laravel queues. In my project, default connection is sync, I want to add sqs connection for one type of jobs. When I dispatch job in this way: TestAction::dispatch()->onQueue('test'); Job is performed immediately (by sync…
mm1492
  • 33
  • 5
3
votes
2 answers

Why jobs table are empty when dispatching a job in Laravel 6?

I'm using laravel 6 I've been struggling all the day to figure out why jobs table never get populated when I dispatch a job When I hit this artisan command php artisan queue:work I get the following [2020-04-08 11:37:04][12] Processing:…
Atef Rihane
  • 183
  • 2
  • 12