改名
This commit is contained in:
@@ -19,7 +19,7 @@ class OnManagerStart extends Callback
|
|||||||
public function onHandler(Server $server)
|
public function onHandler(Server $server)
|
||||||
{
|
{
|
||||||
$this->debug('manager start.');
|
$this->debug('manager start.');
|
||||||
Snowflake::setProcessId($server->manager_pid);
|
Snowflake::setWorkerId($server->manager_pid);
|
||||||
|
|
||||||
$events = Snowflake::app()->event;
|
$events = Snowflake::app()->event;
|
||||||
if ($events->exists(Event::SERVER_MANAGER_START)) {
|
if ($events->exists(Event::SERVER_MANAGER_START)) {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class ServerInotify extends Process
|
|||||||
*/
|
*/
|
||||||
public function onHandler(\Swoole\Process $process)
|
public function onHandler(\Swoole\Process $process)
|
||||||
{
|
{
|
||||||
Snowflake::setProcessId($process->pid);
|
Snowflake::setWorkerId($process->pid);
|
||||||
set_error_handler([$this, 'onErrorHandler']);
|
set_error_handler([$this, 'onErrorHandler']);
|
||||||
if (extension_loaded('inotify')) {
|
if (extension_loaded('inotify')) {
|
||||||
$this->inotify = inotify_init();
|
$this->inotify = inotify_init();
|
||||||
|
|||||||
Reference in New Issue
Block a user