This commit is contained in:
2021-05-18 14:10:39 +08:00
parent f29d488d54
commit a392a5a958
+5 -6
View File
@@ -36,19 +36,18 @@ class Runtime extends Command
$annotation = Snowflake::app()->getAnnotation();
$runtime = storage(static::CACHE_NAME);
$config = storage(static::CONFIG_NAME);
$configs = $this->configEach();
Snowflake::writeFile(storage(static::CONFIG_NAME), serialize($configs));
Snowflake::writeFile($config, $this->configEach());
Snowflake::writeFile($runtime, serialize($annotation->getLoader()));
}
/**
* @return array
* @return string
* @throws Exception
*/
public function configEach(): array
public function configEach(): string
{
$array = [];
$configs = Snowflake::app()->getConfig();
@@ -62,7 +61,7 @@ class Runtime extends Command
$array[$key] = $datum;
}
}
return $array;
return serialize($array);
}