Update: 2026-05-08 14:35:20
This commit is contained in:
@@ -132,20 +132,20 @@ try {
|
||||
$db->commit();
|
||||
echo "Success: Created Invoice $invoiceId\n";
|
||||
|
||||
// Send silent push update for progress
|
||||
$stmt = $db->prepare("SELECT total_images, processed_images, uploaded_by FROM invoice_batches WHERE id = ?");
|
||||
$stmt->execute([$batchId]);
|
||||
$currentBatch = $stmt->fetch();
|
||||
if ($currentBatch) {
|
||||
$notifier = new NotificationService();
|
||||
$notifier->sendDataNotification($currentBatch['uploaded_by'], [
|
||||
'type' => 'batch_progress',
|
||||
'batch_id' => $batchId,
|
||||
'processed' => $currentBatch['processed_images'],
|
||||
'total' => $currentBatch['total_images']
|
||||
]);
|
||||
}
|
||||
|
||||
try {
|
||||
// Send silent push update for progress
|
||||
$stmt = $db->prepare("SELECT total_images, processed_images, uploaded_by FROM invoice_batches WHERE id = ?");
|
||||
$stmt->execute([$batchId]);
|
||||
$currentBatch = $stmt->fetch();
|
||||
if ($currentBatch) {
|
||||
$notifier = new NotificationService();
|
||||
$notifier->sendDataNotification($currentBatch['uploaded_by'], [
|
||||
'type' => 'batch_progress',
|
||||
'batch_id' => $batchId,
|
||||
'processed' => $currentBatch['processed_images'],
|
||||
'total' => $currentBatch['total_images']
|
||||
]);
|
||||
}
|
||||
} catch (\Exception $pushErr) {
|
||||
echo "Push error: " . $pushErr->getMessage() . "\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user