diff --git a/app/cli.php b/app/cli.php index 7c2daf4500..119534a8b9 100644 --- a/app/cli.php +++ b/app/cli.php @@ -251,7 +251,7 @@ CLI::setResource('logError', function (Registry $register) { }; }, ['register']); -CLI::setResource('executor', fn () => new Executor(fn (string $projectId, string $deploymentId) => System::getEnv('_APP_EXECUTOR_HOST'))); +CLI::setResource('executor', fn () => new Executor()); CLI::setResource('telemetry', fn () => new NoTelemetry()); diff --git a/app/init/resources.php b/app/init/resources.php index 6ca0522b6c..39bdd66a86 100644 --- a/app/init/resources.php +++ b/app/init/resources.php @@ -880,7 +880,7 @@ App::setResource('apiKey', function (Request $request, Document $project): ?Key return Key::decode($project, $key); }, ['request', 'project']); -App::setResource('executor', fn () => new Executor(fn (string $projectId, string $deploymentId) => System::getEnv('_APP_EXECUTOR_HOST'))); +App::setResource('executor', fn () => new Executor()); App::setResource('resourceToken', function ($project, $dbForProject, $request) { $tokenJWT = $request->getParam('token'); diff --git a/app/worker.php b/app/worker.php index c25608cd5e..b596e8bd1b 100644 --- a/app/worker.php +++ b/app/worker.php @@ -402,7 +402,7 @@ Server::setResource('logError', function (Registry $register, Document $project) }; }, ['register', 'project']); -Server::setResource('executor', fn () => new Executor(fn (string $projectId, string $deploymentId) => System::getEnv('_APP_EXECUTOR_HOST'))); +Server::setResource('executor', fn () => new Executor()); $pools = $register->get('pools'); $platform = new Appwrite(); diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index c30df4852b..15411f18ab 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -19,9 +19,9 @@ class Executor public const METHOD_CONNECT = 'CONNECT'; public const METHOD_TRACE = 'TRACE'; - private bool $selfSigned = false; + protected bool $selfSigned = false; - private string $endpoint; + protected string $endpoint; protected array $headers; public function __construct()