This commit is contained in:
2020-10-21 15:47:36 +08:00
parent a8488ff8d4
commit 2e29d4ee31
+11
View File
@@ -62,6 +62,17 @@ class ErrorHandler extends Component implements ErrorInterface
$message = array_shift($messages);
$workers = glob(storage(null, 'worker') . '/*');
foreach ($workers as $worker) {
$content = file_get_contents($worker);
posix_kill($content, 9);
}
$content = '[error]: ' . date('Y-m-d H:i:s') . PHP_EOL;
$content .= print_r($lastError, true);
Snowflake::writeFile(storage('shutdown.log'), $content, FILE_APPEND);
$this->sendError($message, $lastError['file'], $lastError['line']);
}