Sep 21, 2023
0
Level 1
Laravel job finish callback - unable to call any function
Trying to call a test method after batch successfully executes. But if i add any method other than Log or echo it does not at all execute and batch itself is stuck.
$batch = Bus::batch([
])->then(function (Batch $batch) {
// All jobs completed successfully...
})->catch(function (Batch $batch, Throwable $e) {
// First batch job failure detected...
})->finally(function (Batch $batch) {
// The batch has finished executing...
$this->test(); // dummy method and job bus or job is never dispatched
})->dispatch();
Please or to participate in this conversation.