Questions tagged [laravel-jobs]

135 questions
3
votes
1 answer

__construct() method call but handle() function not call in laravel job

I am trying to execute job through dispatch() method using laravel 5.4 redis-server supervisor I have done queue config like 'default' => env('QUEUE_DRIVER', 'redis'). I am call dispatch() method in my app/Services file dispatch(new…
3
votes
2 answers

Laravel JobId how to use it to check if job is done

I have problem how to check if a Job is done or not. I am looking everywhere but i don't see that Laravel/Lumen has anything to work with, I am probably missing some. Example code: $job = ((new FooJob($data))); $jobID =…
Danijel
  • 817
  • 1
  • 17
  • 31
2
votes
1 answer

Laravel horizon not processing jobs

I install laravel horizon on a laravel 5.7 project and config it like this: 'domain' => null, 'path' => 'horizon', 'use' => 'default', 'prefix' => env('HORIZON_PREFIX', 'horizon:'), 'waits' => [ 'redis:default' => 60, …
mr javad
  • 163
  • 2
  • 13
2
votes
0 answers

how to run Queue Jobs Manually Laravel

i'm new to laravel. here i'm create jobs on manually like $date = 1615603320 PushNotification::dispatch()->delay($date); Now i'm checking on database Its Showing on 3231207358 enter image description here But its not working on particular Time ?
Pul Teno
  • 31
  • 3
2
votes
1 answer

Configure database connections on the fly in Laravel

In Laravel 8, I am trying to set dynamic connections in two scenarios: After login, depending on the user I set a custom database connection. In this case, after login, in a middleware I call a method: public static function…
Eduardo
  • 1,781
  • 3
  • 26
  • 61
2
votes
1 answer

How to dispatch a chained job in a loop?

I am trying to dispatch a Laravel job inside a foreach loop. But the problem is, when I dispatch job inside loop sometimes it is completed before jobs queued before it are completed. What I want that is jobs should be completed one by one. Like…
user13134426
2
votes
0 answers

Creating a structure with Jobs, Events, Listeners, Queues in Laravel 8

I have a flow about that. I can solve the problem on paper. As a system admin, we have the following models: Clients, Departments, Users, Visitors, Calls, and Meetings. Clients are our customers. Departments are customers' departments. Users have…
2
votes
0 answers

How to update horizon.php in Laravel and how to count proccesses in a queue?

I wrote new schedule and pulled it to test server and it works perfectly, BUT when I pulled it to production it does not work. I watched metrics in laravel-horizon and there was not new Job. So I decided that I had a bit processes therefor I changed…
2
votes
1 answer

is queue:restart laravel command necessary?

i implemented laravel queue in shared hosting by this steps: 1- I set this CronJob on the host for every minute: * * * * * /usr/local/bin/php /home1/myuser/myfolder/artisan schedule:run >> /dev/null 2>&1 2- I set this command on…
K1-Aria
  • 1,093
  • 4
  • 21
  • 34
2
votes
1 answer

Cancel Jobs In Laravel

If I call the following: return AdventureJob::dispatch($event->character->refresh(), $event->adventure, $event->levelsAtATime)->delay($timeTillFinished); This will then create a job thats delayed x minutes. my jobs are all processed through redis,…
TheWebs
  • 12,470
  • 30
  • 107
  • 211
2
votes
2 answers

Laravel - understanding Job concept

Dealing with Laravel queue, what I understand is job is the task that is kept in the queue to be performed one after another. The Laravel doc says : In other words, if you dispatch a job without explicitly defining which queue it should be…
Istiaque Ahmed
  • 6,072
  • 24
  • 75
  • 141
2
votes
0 answers

How to pass curl resource in jobs queue?

How to pass curl resource in jobs queue? but now curl not support for queue ,not response enter code here $fields = json_encode($fields); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,…
Reshma
  • 31
  • 7
2
votes
1 answer

Laravel - Queue jobs are not reused?

I know, the question is very strange... Scenario: I have a Job class that sends an email, but the content of this email is modified, since the template of the email is selected before being of dispatch. I do not know if it's a truth, but apparently…
Magno Alberto
  • 628
  • 14
  • 27
2
votes
1 answer

Laravel: Jobs failed - SQLSTATE[42S02]: Base table or view not found

I'm developing a Multi Tenant with Laravel v5.7 and I'm successful in sending queue emails, since my models have the property 'connection' defined. But when trying to send, for example, an email using the Jobs class, the same fails and informs that…
Magno Alberto
  • 628
  • 14
  • 27
2
votes
1 answer

Failed jobs marked as completed in laravel

I am using Laravel 5.7 with php 7.3, Apache2, Redis for Laravel Horizon. I am getting an issue, the jobs never get fail if there is any error. Ex. If I forget to add the use App\Order; then ideally this shall be marked as Failed but currently it…
1
2
3
8 9