Questions tagged [laravel-jobs]
135 questions
0
votes
0 answers
How do I configure queue workers, connection and limiter to avoid job failing
My Project consumes several 3rd party APIs which enforce requests limiting. My Project calls these api's through Laravel Jobs. I am using using Spatie/aravel-rate-limited-job-middleware for rate limiting
Once a Project is submitted, around 60 jobs…

Pankaj Jha
- 886
- 15
- 37
0
votes
1 answer
how to optimize laravel jobs inside loop
There is a function that is inside the job (queue) . and I dispatch that queue. Inside for each loop.
public function autoConsignmentChargeCalculate($consignments, $user_id, $notify)
{
$i = 1;
$total_consignments =…

Bilal Arshad
- 531
- 3
- 11
- 33
0
votes
2 answers
Why did I get a timed out error after queuing up 7k jobs?
I'm sending around 7k emails using Laravel and SES. Because I have a limit of 10 emails per second I need to delay when Laravel is sending all the emails in batches of 10 at a time.
Controller
public function queue(){
$invites =…

Victor
- 133
- 1
- 6
0
votes
1 answer
Laravel: How to run a cron job as specific user?
Our system has some scheduled jobs, one of the jobs should run as a user to get authorized. What is the best way to do it?
App\Console\Kernel
schedule has these,.
....
$schedule->job(new EveryMinuteJob)->everyMinute();
…

OutForCode
- 381
- 9
- 26
0
votes
1 answer
How to execute laravel job at low priority?
We have multiple jobs in our laravel application. Currently all jobs are queued at once and they execute one by one. I want this particular job to execute at low priority it means if anyother job comes after that job should be execute…

Bilal Arshad
- 531
- 3
- 11
- 33
0
votes
0 answers
Pdf Merge Taking too long in laravel job
I am merging pdfs . These files could be more than 100 . Now problem is my server only has 1 GB RAM. Server hangs when these merging starts actually this process is working in Job. It works fine on my localhost which has 4 GB of RAM . First thing I…

Bilal Arshad
- 531
- 3
- 11
- 33
0
votes
1 answer
Laravel 7 run queue:listen from route on shared hosting
I am wondering how to run php artisan queue:listen database manually to execute a job on a shared hosting. I am trying it from route file web.php :
Route::get('/job', function () {
Artisan::call('queue:listen');
return 'Job…

Wahidul Alam
- 1,216
- 4
- 26
- 56
0
votes
1 answer
Laravel - cannot send message without a sender address
I have trouble with sending multiple jobs in Laravel.
Sometimes it working all right.
Sometimes I got this message cannot send message without a sender address in failed_job table and just 1 one worked.
Sometimes both not working.
And that's in my…

Dương Việt Hoàng
- 83
- 2
- 8
0
votes
1 answer
Passing data to Queue Job gives 404 - Not other Error
From My Controller
use App\Jobs\MonthlyReport;
public function store(Request $request)
{
$report = new Report;
...
$report->save();
$this->dispatch(new MonthlyReport($report));
return $report;
}
MonthlyReport.php
use App\Report;
private…

Vpa
- 703
- 2
- 9
- 30
0
votes
0 answers
Best way to Import Large .TXT files into database in laravel
I am working to import awstats files into database. I have large number of files and maximum size of file about 10MB and about 200k lines in large size files. file is divided into several sections one of the sample is given below:
BEGIN_GENERAL…

Waseel Ahmad Mufti
- 169
- 6
- 16
0
votes
1 answer
Laravel Jobs and Queues not working as expected
I'm creating an application which generates a video. This is a quite intensive function and takes a few minutes to generate. So I want to create a async process for this. After some research I've read about Jobs and Queues in Laravel.
But now my…

RW24
- 624
- 2
- 10
- 19
0
votes
1 answer
Laravel Job not seeing passed variables
Laravel 7.2.2
I am creating a job with Laravel inside an existing job. Firing the first job works fine, once it's fires the second job it crashed giving the following error:
Too few arguments to function App\Jobs\CreateAlarm::__construct(), 0 passed…

Cas Bekhuis
- 71
- 1
- 9
0
votes
0 answers
How to store aditional data in laravel JOB table
Scenario: A user can do multiple assignments In a class.
So user has an ID [user_id], assignment has an ID [assignment_id], user may do the assignment in multiple time. therefore an assignment that user did has an attempt number [assignment_attempt…

ashanrupasinghe
- 758
- 1
- 10
- 22
0
votes
0 answers
Undefined property when using Queue::before job
I have a problem and after 2hours didn't figure out what's my problem!
I use Queue::before in AppServiceProvider, and I want to check if x value for x user exists in the table don't fire job instantly and add release it after 60 sec ! and again this…

Shayan Sakha
- 83
- 6
0
votes
1 answer
how to put schedule task jobs in chain in laravel?
I am using laravel task scheduling inside it queue jobs or working i want to put these jobs in chain
kernel.php
$schedule->job(new \App\Jobs\FetchEmailAttachment)->dailyAt('16:15')->timezone('Australia/Melbourne');
$schedule->job(new…

Bilal Arshad
- 531
- 3
- 11
- 33