Update: 2026-05-08 14:29:22
This commit is contained in:
@@ -57,6 +57,12 @@ $stmt = $db->prepare("
|
||||
");
|
||||
$stmt->execute([$batchId]);
|
||||
|
||||
// 3. If it's a single invoice, try triggering the worker in the background immediately
|
||||
// This helps if the Cron Job is delayed or failing.
|
||||
$workerPath = ROOT_PATH . '/app/cron/process_batches.php';
|
||||
$logPath = STORAGE_PATH . '/logs/cron.log';
|
||||
exec("php " . escapeshellarg($workerPath) . " >> " . escapeshellarg($logPath) . " 2>&1 &");
|
||||
|
||||
json_success([
|
||||
'batch_id' => $batchId,
|
||||
'status' => 'processing',
|
||||
|
||||
Reference in New Issue
Block a user