143 questions
0
votes
0
answers
91
views
Laravel Queue Process Slow
I hope you’re all doing well. I’m reaching out because I’m facing an issue with my setup. I have a .NET application and a Laravel system integrated via API. The .NET application sends payloads to the ...
-2
votes
1
answer
85
views
Laravel Job issue with multiple databases
I am facing an issue in my Laravel project. I have created multiple databases. When a user logs in through the frontend, they have to select a company code. With this code we decide which database has ...
1
vote
0
answers
68
views
Laravel queue/jobs is looking at the wrong database when job fails to record it
the queue can read the jobs table and find the right database.
However, when the job fails, it defaults to the connection database.sqlite, which is wrong.
I am getting this error -- database file at ...
0
votes
2
answers
189
views
How to keep queue:work running continuously in Windows Task Scheduler even when the job queue is empty?
I’m working with a Laravel project and I need to run the php artisan queue:work command continuously, even when there are no jobs in the queue. I have already set up a Windows Task Scheduler task to ...
0
votes
0
answers
178
views
Alternative methods for testing Laravel job dispatching in unit tests
I'm writing unit tests for a job's login functionality in Laravel. However, when I attempted to dispatch the job using Job::dispatchSync, it seems that the job wasn't executed.
Upon further ...
1
vote
0
answers
283
views
Laravel Job Batches - deadlock
I have a chain of two batches. One to prepare stuff and one to execute it. I had a lot of issues with it in the database, but I moved it to redis and it's perfect now.
However, the jobs are quite fast ...
1
vote
0
answers
70
views
Is it possible to use Laravel Horizon installed within one module to monitor queues in another module, both of which are using the same Redis?
iam new to Redis and Horizon
i have two laravel projects hosted in same server, which are using same database and same redis service.
Let's say the projects are X and Y.
I have configured Laravel ...
0
votes
0
answers
325
views
Laravel in production server scheduled jobs dispatches twice
In Laravel 7 I use supervisor in my production server(Ubuntu) to get some jobs running automatically.
in local env everything work well. but in my production server every job queuing twice.
This my ...
0
votes
1
answer
122
views
how to send notification to user after dispatching batch job
I'm trying to send bulk sms with batch jobs, I want to send more than 1000 sms through the result of a user filter. I do a one time job to do a foreach to save a series of jobs and then submit another ...
0
votes
1
answer
1k
views
laravel queue:work are not processing until I run the job synchronously
Laravel version 8.83.17.
I've been using laravel for years and this seems to be a weird problem only occured in one of my mac machine.
Queue driver is using local Redis. have set QUEUE_CONNECTION=...
1
vote
0
answers
568
views
How can i send notification to all users devices using Laravel Job?
I want to send a notification to all users when I click on send notification button it shows a success message on the spot without taking time and it sends a notification to all users in the ...
0
votes
0
answers
199
views
Laravel 9 Call Stored Procedure using Jobs
I have stored procedure which is doing a task. When i try to execute in the controller it takes more time. So i planned to put as Job. When i try to execute nothing happens in the execution
Controller
...
0
votes
1
answer
893
views
How to run laravel queue jobs in multiple databases?
I have multiple databases in my project based on company we are giving new database for that company.i am developing automation workflows in my current project for that i was planned to implemented ...
0
votes
1
answer
1k
views
How to add PDF attachment in queue mails In Laravel?
I was able to send an email but when I put the attachData() in the UserMail there was an error. I think because of the parameter $this->pdf that should be declared in UserEmailJob, and I don't know ...
0
votes
0
answers
35
views
Initiating Private Property via loop and checking exists before accessing it
I'm using Laravel Job to process some data, passing a device object which has json array in it.
defined private properties, Note there are way more than just 3
private int $width;
private int $depth;
...
1
vote
0
answers
1k
views
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(...
1
vote
1
answer
1k
views
Why laravel dispatcer dispatch() function not creating jobs in jobs table of particular database?
I have multiple databases and switching database as per some conditions before dispatching jobs. For eg:
if(condition A){
DB::setDefaultConnection('A');
} else {
DB::setDefaultConnection('B');
}
...
0
votes
1
answer
500
views
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 ...
1
vote
0
answers
223
views
Database changes not working when exception is thrown in queue/job
Im dispatching jobs that makes use of a table containing unprocessed data fetched from a file from an ftp server; which this job should process and insert or update on a separate table.
In my job file ...
3
votes
1
answer
2k
views
laravel 9 scheduled job executed but not queued
I recognised a strange behavior after upgrading laravel from 8 to 9. I have a scheduler that executes some jobs.
Kernel.php:
$schedule->job(new ImportAzApplications, 'imports')
->...
1
vote
0
answers
3k
views
Handle function in Laravel job class is not working but the constructor in job class working.Why?
dispatch((new placeJob($data))->onQueue('important'));
this line calls the job constructor, but log statement and any other statement in handle function is not working.
i'm trying to dispatch the ...
1
vote
1
answer
992
views
while error thrown by artisan custom command, it is not getting caught in laravel exception handler
When running custom artisan command which dispatches job, if any exception occur in job it should call handler.php but it doesn't get called.
I need to send an email for each type of exception caught ...
0
votes
0
answers
1k
views
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(...
0
votes
1
answer
600
views
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 ...
1
vote
1
answer
1k
views
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 ...