改名
This commit is contained in:
@@ -86,9 +86,7 @@ class Annotation extends Component
|
|||||||
*/
|
*/
|
||||||
public function runtime(string $dir, string|array $outPath = null)
|
public function runtime(string $dir, string|array $outPath = null)
|
||||||
{
|
{
|
||||||
if ($outPath === null) {
|
if (!empty($outPath) && !is_array($outPath)) {
|
||||||
$outPath = [];
|
|
||||||
} else if (!empty($outPath) && !is_array($outPath)) {
|
|
||||||
$outPath = [$outPath];
|
$outPath = [$outPath];
|
||||||
}
|
}
|
||||||
$this->_loader->loadByDirectory($dir, $outPath);
|
$this->_loader->loadByDirectory($dir, $outPath);
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ class Loader extends BaseObject
|
|||||||
if (!str_contains($key, $path)) {
|
if (!str_contains($key, $path)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (in_array($key, $outPath)) continue;
|
if (!empty($outPath) && in_array($key, $outPath)) continue;
|
||||||
$this->execute($_path);
|
$this->execute($_path);
|
||||||
}
|
}
|
||||||
} catch (Throwable $exception) {
|
} catch (Throwable $exception) {
|
||||||
|
|||||||
@@ -90,8 +90,9 @@ class OnWorkerStart extends Callback
|
|||||||
name($server->worker_pid, 'Worker#' . $server->worker_id);
|
name($server->worker_pid, 'Worker#' . $server->worker_id);
|
||||||
|
|
||||||
$time = microtime(true);
|
$time = microtime(true);
|
||||||
$annotation->runtime(directory('app'));
|
$annotation->runtime(CONTROLLER_PATH);
|
||||||
$this->debug('use time.' . microtime(true) - $time);
|
$this->debug('use time.' . microtime(true) - $time);
|
||||||
|
$annotation->runtime(directory('app'), CONTROLLER_PATH);
|
||||||
|
|
||||||
Snowflake::setWorkerId($server->worker_pid);
|
Snowflake::setWorkerId($server->worker_pid);
|
||||||
putenv('environmental=' . Snowflake::WORKER);
|
putenv('environmental=' . Snowflake::WORKER);
|
||||||
|
|||||||
Reference in New Issue
Block a user