Conversation
e90bc74 to
29e16c8
Compare
src/Executor/Runner/Docker.php
Outdated
| * @param Table $statsContainers | ||
| * @return void | ||
| */ | ||
| public function init(Table $activeRuntimes, array $networks, Table $statsHost, Table $statsContainers): void |
There was a problem hiding this comment.
Will we need to handle state like this also in the other adapter? If we do, can we have a parent class that handles this on a higher level? This will help us make adapters leaner and avoid having to pass this knowledge/tasks between adapters.
Can we also move this logic to the constructor instead of having an init method?
There was a problem hiding this comment.
Removed public init hook.
19973e7 to
536cbe3
Compare
There was a problem hiding this comment.
To facilitate the edge router, and matching cloud structure, I propose this file structure:
app/init.php to initialise all the resources and adapters
app/controllers.php to contain all the executor routes. This would be used in only Appwrite CE.
app/http.php (currently run.php) to depend on the controllers and init and then start the server.
This way, in the edge, we can simply depend on the init and overwrite the resource with the runner adapter. What do you think?
This moves runner related code into an adapter.