Skip to content

Commit

Permalink
plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
walkor committed Jan 9, 2022
1 parent 10abf85 commit 883ea4f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions start.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@
$app = new App($worker, Container::instance(), Log::channel('default'), app_path(), public_path());
Route::load(config_path());
Middleware::load(config('middleware', []));
foreach (config('plugin', []) as $name => $project) {
Middleware::load($project['middleware']??[]);
foreach (config('plugin', []) as $firm => $projects) {
foreach ($projects as $name => $project) {
Middleware::load($project['middleware'] ?? []);
}
}
Middleware::load(['__static__' => config('static.middleware', [])]);
Http::requestClass(Request::class);
Expand All @@ -82,9 +84,11 @@
foreach (config('process', []) as $process_name => $config) {
worker_start($process_name, $config);
}
foreach (config('plugin', []) as $key => $project) {
foreach ($project['process'] ?? [] as $process_name => $config) {
worker_start("plugin.$key.$process_name", $config);
foreach (config('plugin', []) as $firm => $projects) {
foreach ($projects as $name => $project) {
foreach ($project['process'] ?? [] as $process_name => $config) {
worker_start("plugin.$firm.$name.$process_name", $config);
}
}
}
}
Expand Down

0 comments on commit 883ea4f

Please sign in to comment.