Skip to content

Commit 883cb59

Browse files
committed
log_queue_redis_key
1 parent 7a59eea commit 883cb59

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/TerminalServer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22
namespace Swango\HttpServer;
33
class TerminalServer {
4+
public static $log_queue_redis_key = 'http_server_log_host_queue';
45
private $status, $gc_collect_cycles_result, $clear_cache_result;
56
private $fd_table, $switch_log_request_1, $switch_log_request_2, $notify_log_queue_atomic;
67
public function __construct(\Swoole\Server\Port $port) {
@@ -321,7 +322,7 @@ public function notifyLogQueue(bool $force = false) {
321322
if ($force || $this->notify_log_queue_atomic->get() === 0 && $this->notify_log_queue_atomic->add() === 1) {
322323
$redis = \Swango\Cache\RedisPool::pop();
323324
$redis->select(1);
324-
$redis->lPush('http_server_log_host_queue', \Swango\Environment::getServiceConfig()->local_ip);
325+
$redis->lPush(self::$log_queue_redis_key, \Swango\Environment::getServiceConfig()->local_ip);
325326
\Swango\Cache\RedisPool::push($redis);
326327
}
327328
}

0 commit comments

Comments
 (0)