改名
This commit is contained in:
@@ -27,13 +27,12 @@ class OnShutdown extends Callback
|
||||
|
||||
/**
|
||||
* @param Server $server
|
||||
* @throws ConfigException|ComponentException
|
||||
* @throws ComponentException
|
||||
* @throws Exception
|
||||
*/
|
||||
public function onHandler(Server $server)
|
||||
{
|
||||
$this->system_mail(Config::get('email'), Config::get('nickname'), 'server shutdown~');
|
||||
|
||||
$this->system_mail('server shutdown~');
|
||||
$event = Snowflake::get()->getEvent();
|
||||
if (!$event->exists(Event::SERVER_SHUTDOWN)) {
|
||||
return;
|
||||
|
||||
@@ -19,7 +19,7 @@ class OnWorkerError extends Callback
|
||||
* @param int $worker_pid
|
||||
* @param int $exit_code
|
||||
* @param int $signal
|
||||
* @throws ConfigException
|
||||
* @throws Exception
|
||||
*/
|
||||
public function onHandler(Server $server, int $worker_id, int $worker_pid, int $exit_code, int $signal)
|
||||
{
|
||||
@@ -27,9 +27,7 @@ class OnWorkerError extends Callback
|
||||
if (!Config::has('email')) {
|
||||
return;
|
||||
}
|
||||
$email = Config::get('email');
|
||||
$name = Config::get('nickname', false, 'Admin');
|
||||
$this->system_mail($email, $name, print_r([
|
||||
$this->system_mail(print_r([
|
||||
'$worker_pid' => $worker_pid,
|
||||
'$worker_id' => $worker_id,
|
||||
'$exit_code' => $exit_code,
|
||||
|
||||
Reference in New Issue
Block a user