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(); $annotation = Snowflake::app()->getAnnotation();
$runtime = storage(static::CACHE_NAME); $runtime = storage(static::CACHE_NAME);
$config = storage(static::CONFIG_NAME);
$configs = $this->configEach(); Snowflake::writeFile($config, $this->configEach());
Snowflake::writeFile(storage(static::CONFIG_NAME), serialize($configs));
Snowflake::writeFile($runtime, serialize($annotation->getLoader())); Snowflake::writeFile($runtime, serialize($annotation->getLoader()));
} }
/** /**
* @return array * @return string
* @throws Exception * @throws Exception
*/ */
public function configEach(): array public function configEach(): string
{ {
$array = []; $array = [];
$configs = Snowflake::app()->getConfig(); $configs = Snowflake::app()->getConfig();
@@ -62,7 +61,7 @@ class Runtime extends Command
$array[$key] = $datum; $array[$key] = $datum;
} }
} }
return $array; return serialize($array);
} }