info(sprintf('服务运行ID : %s', SERVER_RUN_ID)); // 维护服务运行状态 $this->setTimeOut(); Timer::tick(15000, function () { $this->setTimeOut(); }); } public function setTimeOut() { container()->get(Redis::class)->hset('SERVER_RUN_ID', SERVER_RUN_ID, time()); } }