This commit is contained in:
as2252258@163.com
2021-02-27 04:56:35 +08:00
parent bc6ea06635
commit fb1d5172ca
+5 -1
View File
@@ -176,6 +176,10 @@ class Snowflake
{ {
$dir = storage(null, 'worker'); $dir = storage(null, 'worker');
foreach (glob($dir . '/*') as $file) { foreach (glob($dir . '/*') as $file) {
clearstatcache();
if (!file_exists($file)) {
continue;
}
@unlink($file); @unlink($file);
} }
} }
@@ -389,7 +393,7 @@ class Snowflake
*/ */
public static function reload(): mixed public static function reload(): mixed
{ {
return Process::kill((int)Snowflake::getMasterPid(),SIGUSR1); return Process::kill((int)Snowflake::getMasterPid(), SIGUSR1);
} }