Skip to content

Commit

Permalink
Fix expiration of fail lock. Set to 20 min instead of 5s
Browse files Browse the repository at this point in the history
  • Loading branch information
rliebi committed Oct 23, 2024
1 parent 1d62a7d commit 1ddf4d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Service/LockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function createLockFromKey(Key $key, ?int $ttl = null, ?bool $autorelease
public function lockExecution(string $document): Key
{
$key = $this->getKey($document, 'failure');
$this->redis->set((string) $key, 1, ['NX', 'EX' => 5]);
$this->redis->set((string) $key, 1, ['NX', 'EX' => 1200]);
$this->consoleOutput->writeln(sprintf('Locking execution for %s (%s)', $document, hash('sha256', (string) $key)), ConsoleOutputInterface::VERBOSITY_VERBOSE);

return $key;
Expand Down

0 comments on commit 1ddf4d8

Please sign in to comment.