Questions tagged [laravel-jobs]

135 questions
0
votes
0 answers

Send file in Laravel job

I have a problem with laravel jobs I have a file in the local storage and I want to send this file to a controller in my job, and I don't know how to do this.
0
votes
0 answers

why laravel run all the job items in queue, except some items?

My cron job on cpanel is schedule:run and run every minute. in the App\Console\Kernel.php -> schedule() method I have some command that works fine. one of these command is : protected function schedule(Schedule $schedule) { …
aref razavi
  • 413
  • 2
  • 12
0
votes
0 answers

Laravel Job (Without Queue) Not Dispatching With Laravel Octane

I have an "/x" api endpoint that dispatches a "MakeXJob" Job (without ShouldQueue). In local environment without Octane, it works just fine. But in Server with Octane (Swoole), does not dispatching the job. I am dispatching in command line with…
Alper
  • 152
  • 1
  • 7
0
votes
0 answers

Why job_batches table is in db in instead of redis?

We are using Redis to work with laravel jobs. when there are a lot of jobs DB instance CPU utilization increases to 100%. I see that in the telescope all jobs included using batch are stored in the job_batches table. of course, to insert and delete…
web pakistan
  • 444
  • 1
  • 4
  • 16
0
votes
0 answers

Unable to access laravel job after failure

I'm trying to get the ID or UUID of a failed job by calling depending on the failed() method on the Job class but I'm getting an error about the job being null Here's my code: public function failed(Throwable $exception) { $uuid =…
Willower
  • 1,099
  • 8
  • 22
0
votes
1 answer

Guzzle calls in helper function randomly return 'magic request methods require a URI' error

My server is running on PHP 7.2 - Laravel 5.8 - Redis Jobs - NewRelic for monitoring configuration. The guzzle call is written inside helper function (that is autoloader from composer.json). The problem happens randomly. We get this…
0
votes
1 answer

How to stop specific schedule task (cron job) in laravel 5 on live server cpanel

I have created multiple schedule tasks in laravel 5, and created cron job on cpanel it is working fine. But now i want to stop specific schedule task, i have comment the command and remove class from app/Console/kernel.php file, but still it is…
0
votes
1 answer

laravel scheduling and jobs and queues

I have a series of drivers for sending emails, for example Gmail, Yahoo, etc. The structure of the database: drivers_table: id name host status user pass 1 Gmail google.com 1 user1 pass1 2 Yahoo yahoo.com…
Hossein
  • 67
  • 1
  • 9
0
votes
0 answers

Testing a batch creating job

I'm trying to test that a job is batching the correct number of another job like so Bus::fake(); ... (new App\Jobs\ProcessChunkOfProducts($this->productsAsChunk()))->handle(); Bus::assertBatched( function (PendingBatch $batch) { return…
damask
  • 529
  • 4
  • 17
0
votes
1 answer

Laravel 8 doesn't send an email notification when notifications are set to job

I am trying to send a notification via email. Everything is fine as long as I don't want to do it on the job. When I add implements ShouldQueue to the notification class, the task fails with the error Swift_TransportException: Cannot send message…
0
votes
1 answer

Laravel 8 - Queue jobs timeout, Fixed by clearing cache & restarting horizon

My queue jobs all run fairly seamlessy in our production server, but about every 2 - 3 months I start getting a lot of timeout exceeded/too many attempts exceptions. Our app is running with event sourcing and many events are queued so neededless to…
Adam Lambert
  • 1,311
  • 3
  • 24
  • 45
0
votes
2 answers

Job incorrectly shows as dispatched during testing

I have the following test cases: protected function setUp(): void { parent::setUp(); Queue::fake(); } public function testUpdate(): void { $this->updateModel(["foo" => 123]); $this->assertDatabaseHas("models", ["foo" =>…
miken32
  • 42,008
  • 16
  • 111
  • 154
0
votes
1 answer

How to delay Laravel Job Queue

I am trying to learn about Jobs and queues in Laravel , when i try to learn something new i always take a basic example by myself and try to understand the workflow better. Okay here is the problem I have created a Job in Laravel as you can see in…
Thymeleaf
  • 93
  • 2
  • 10
0
votes
2 answers

Laravel won't send anymore mails after testing my job class on prouction using "QUEUE_DRIVER=sync"

At first, it sends some emails then stopped without giving any errors, I tested tinker and it gives "null" without receiving anything!! this is my…
0
votes
0 answers

Send webhook at specific datetime laravel 8

In my application (laravel 8) i create some messages, store them in a postgrey database and send them via webhook to discord ans slack. I can choose to send them right away or delay them with a datetime in the database. Here is my problem. I dont…
1 2 3
8 9