6
0
Fork 0
release
李静 2022-01-07 21:56:45 +08:00
parent 0918976250
commit e8ad2bd135
1 changed files with 24 additions and 20 deletions

View File

@ -35,6 +35,7 @@ class PreIncomeJobCommand extends Command
*/
public function handle(DistributionPreIncomeJobService $jobService)
{
while (true) {
DistributionPreIncomeJob::with('jobable')->pending()->chunkById(200, function ($jobs) use ($jobService) {
foreach ($jobs as $job) {
try {
@ -74,5 +75,8 @@ class PreIncomeJobCommand extends Command
}
}
});
sleep(5);
}
}
}