Skip to content

Commit

Permalink
work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
januabisconti committed Nov 27, 2024
1 parent f6e7ca3 commit ebacb61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Traits/ManagesLocksAndShardsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ protected function acquireLock(string $key, ?string $connection_name = null): bo
$lockKey = 'lock:' . $key;
// Tenta di acquisire il lock con un timeout di 10 secondi
//return $this->redis->getRedisConnection($connection_name)->set($lockKey, '1', 'NX', 'EX', 10);
return $this->redis->getRedisConnection($connection_name)->set($key, 1, 'NX', 'EX', 10);
return $this->redis->getRedisConnection($connection_name)->set($key, 1, 'EX', 10, 'NX');
}

/**
Expand Down

0 comments on commit ebacb61

Please sign in to comment.