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
6
votes
2 answers

Delay a Laravel Artisan command queued from code

I am running an Artisan command from a controller in my Laravel app. As the docs specify, you can queue like this: Artisan::queue('email:send', [ 'user' => 1, '--queue' => 'default' ]); This takes care the queue logic and, in my case, sends the…
samiles
  • 3,768
  • 12
  • 44
  • 71
5
votes
1 answer

How to send an exception to Sentry from Laravel Job only on final fail?

Configuration I'm using Laravel 8 with sentry/sentry-laravel plugin. There is a Job that works just fine 99% of time. It retries N times in case of any problems due to: public $backoff = 120; public function retryUntil() { return…
frutality
  • 345
  • 1
  • 3
  • 13
5
votes
0 answers

Laravel: How to detect if code is being executed from within a queued job, as opposed to manually run from the CLI

I found this similar question How to check If the current app process is running within a queue environment in Laravel But actually this is the opposite of what I want. I want to be able to distinguish between code being executed manually from an…
vesperknight
  • 720
  • 9
  • 17
5
votes
1 answer

How to dispatch chained jobs to a queue in Lumen 6?

In Laravel, it is possible to specify a list of queued jobs that should be run in sequence after the primary job has executed successfully. If one job in the sequence fails, the rest of the jobs will not be run. The Laravel documentation shows that…
Derrick Miller
  • 1,860
  • 3
  • 21
  • 37
5
votes
3 answers

Laravel delete job once it fails

I have a job that times out and once it fails it dispatches another one just like itself so that it can run infinitely and without overlapping. However the job that fails stays in the queue and gets re-tried so I eventually have more than one job…
PU2014
  • 323
  • 5
  • 17
5
votes
2 answers

Laravel jobs (database) do not execute handle

I have a problem with laravel jobs. I configured laravel jobs to work with the database and it is working. When I execute a job, the entry is created in database and the constructor is well executed. However, the handle function is never executed…
tom1337
  • 228
  • 3
  • 11
5
votes
2 answers

Laravel - How to Clear cache of array language

I have a laravel application and I have two different languages. My problem is that I'm using queued emails and that just work with default language, so I try to add new keys and values to default language array to give me the possibility to use in…
user3242861
  • 1,839
  • 12
  • 48
  • 93
5
votes
1 answer

Laravel 5.4 saving models via async queue

So I am trying to optimize my site and on every page load and exit I save a metric (time on page, ip address etc) for analytics. However these are decent sized bottlenecks on my server. When viewing the time it takes for things to run my entire…
CMOS
  • 2,727
  • 8
  • 47
  • 83
5
votes
0 answers

Laravel job runs twice when dispatched

I am trying to run a simple job within Laravel queues. The following is my Job. class SearchFromSource extends Job implements SelfHandling, ShouldQueue { use InteractsWithQueue, SerializesModels; public function handle() { echo…
Alireza
  • 215
  • 1
  • 3
  • 13
4
votes
5 answers

image not displaying in mail in queue - laravel

In my mail template I used image path as below : logo It is working with normal mail (without the queue) but not in mail in queue. By inspecting element in mail…
Yasin Patel
  • 5,624
  • 8
  • 31
  • 53
4
votes
1 answer

How do I debug an exit code 12 between jobs in queue:work

We have a job MyPrettyJob, that is queued through redis from a controller. When we run this job from the command like so, the job does succeed. When we run the job with little data the queue stays online, but when we run the job with a lot of data…
Sumurai8
  • 20,333
  • 11
  • 66
  • 100
4
votes
4 answers

Laravel 5 Run queue:work on laravel schedule

I have a schedule like this:
paranoid
  • 6,799
  • 19
  • 49
  • 86
4
votes
2 answers

How to configure multiple exchanges in laravel-queue-rabbitmq?

I have found famous library for using RabbitMQ in Laravel. In configuration config/queue.php I can specify only one exchange and queue name. Does it support multiple exchanges?
POV
  • 11,293
  • 34
  • 107
  • 201
4
votes
2 answers

Laravel Horizon - Multiple queues running from one supervisor

Can anyone help with the correct configuration within horizon.php to get a single supervisor to run multiple queues? I have tried: 'supervisor-1' => [ 'connection' => 'redis', 'queue' => ['default', 'queue2'], 'balance' => 'simple', …
Adam Lambert
  • 1,311
  • 3
  • 24
  • 45
4
votes
1 answer

Laravel 5 Check queue:work run on windows

I send email on my script with laravel queue. I need to run php artisan queue:work on my script for run laravel queue. I want to monitor if this php artisan queue:work failed, I run again. My solution is command like this on corn job class Kernel…
paranoid
  • 6,799
  • 19
  • 49
  • 86
1 2
3
29 30