Skip to content

Commit e5513d4

Browse files
committed
ottimizzate insert
1 parent a9b1bd8 commit e5513d4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Console/ProcessCacheInvalidationEventsCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ protected function processBatch(array $batchIdentifiers, array $eventsToUpdate,
390390
// Rollback transaction on error
391391
DB::rollBack();
392392
$attempts++;
393+
$this->warn(now()->toDateTimeString() . ": Tentativo $attempts di $maxAttempts: " . $e->getMessage());
393394
// Logica per gestire i tentativi falliti
394395
if ($attempts >= $maxAttempts) {
395396
// Salta il record dopo il numero massimo di tentativi
@@ -495,7 +496,7 @@ public function handle(): void
495496
try {
496497
$this->processEvents($shardId, $priority, $limit, $tagBatchSize, $connection_name);
497498
} catch (\Throwable $e) {
498-
$this->error(now() . ' Si è verificato un errore in ' . __METHOD__ . ': ' . $e->getMessage());
499+
$this->error(now()->toDateTimeString() . ': Si è verificato un errore in ' . __METHOD__ . ': ' . $e->getMessage());
499500
} finally {
500501
$this->helper->releaseShardLock($shardId, $priority, $lockValue, $connection_name);
501502
}

0 commit comments

Comments
 (0)