Skip to content

Commit

Permalink
chore: Update RedisServerMutex.php to include owner information in de…
Browse files Browse the repository at this point in the history
…bug log
  • Loading branch information
huangdijia committed Sep 11, 2024
1 parent 4106406 commit b37450c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions publish/trigger.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

'server_mutex' => [
'enable' => true,
'prefix' => env('APP_ENV', 'dev') . '_',
'expires' => 30,
'keepalive_interval' => 10,
'retry_interval' => 10,
Expand Down
2 changes: 1 addition & 1 deletion src/Mutex/RedisServerMutex.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(
) {
$this->expires = (int) ($options['expires'] ?? 60);
$this->keepaliveInterval = (int) ($options['keepalive_interval'] ?? 10);
$this->name = $name ?? sprintf('trigger:server:%s', $this->connection);
$this->name = ($options['prefix'] ?? '') . ($name ?? sprintf('trigger:server:%s', $this->connection));
$this->owner = $owner ?? Util::getInternalIp();
if (isset($options['connection'])) {
$this->connection = $options['connection'];
Expand Down

0 comments on commit b37450c

Please sign in to comment.