mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Merge branch 'dillon/122-1688-po-automation-project-pusher' into vapor/development
This commit is contained in:
@@ -77,7 +77,18 @@ class ETLPurchaseOrderTransactionV2CommandJob implements ShouldQueue
|
||||
|
||||
(App()->make(ETLPDFPurchaseOrderClaudeProcessor::class))->execute($this->files, $this->bookingId, $this->batchIndex !== 1, $this->isLast);
|
||||
|
||||
$finished = Cache::increment('etl_finished_jobs_' . $this->groupId);
|
||||
$cacheKey = 'etl_finished_jobs_' . $this->groupId;
|
||||
$lockKey = $cacheKey . '_lock';
|
||||
$finished = 0;
|
||||
|
||||
Cache::lock($lockKey, 10)->block(5, function () use ($cacheKey, &$finished) {
|
||||
// Get current counter (default 0)
|
||||
$current = Cache::get($cacheKey, 0);
|
||||
$finished = (int)$current + 1;
|
||||
|
||||
// Save updated counter
|
||||
Cache::put($cacheKey, $finished, 3600);
|
||||
});
|
||||
|
||||
Log::info('ETL job finished for group ' . $this->groupId, [
|
||||
'batch_index' => $this->batchIndex,
|
||||
|
||||
Reference in New Issue
Block a user