From 1fd7f0c5d713f141cfff7fc50fae070a9f6bc76f Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 18 Jul 2023 10:54:11 +0300 Subject: [PATCH] SSl task --- .env | 4 ++-- src/Appwrite/Platform/Tasks/SSL.php | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.env b/.env index fff40e5f71..351f2548dc 100644 --- a/.env +++ b/.env @@ -44,8 +44,8 @@ _APP_SMTP_PASSWORD= _APP_HAMSTER_INTERVAL=86400 _APP_HAMSTER_TIME=21:00 _APP_MIXPANEL_TOKEN= -_APP_SMS_PROVIDER=sms://username:password@mock -_APP_SMS_FROM=+123456789 +_APP_SMS_PROVIDER=sms://5fccf626:sFYCY5Q2Z7zTbsPK@vonage +_APP_SMS_FROM=+972504368300 _APP_STORAGE_LIMIT=30000000 _APP_STORAGE_PREVIEW_LIMIT=20000000 _APP_FUNCTIONS_SIZE_LIMIT=30000000 diff --git a/src/Appwrite/Platform/Tasks/SSL.php b/src/Appwrite/Platform/Tasks/SSL.php index 43026b0753..6dbf4dcd70 100644 --- a/src/Appwrite/Platform/Tasks/SSL.php +++ b/src/Appwrite/Platform/Tasks/SSL.php @@ -21,14 +21,15 @@ class SSL extends Action $this ->desc('Validate server certificates') ->param('domain', App::getEnv('_APP_DOMAIN', ''), new Hostname(), 'Domain to generate certificate for. If empty, main domain will be used.', true) - ->callback(fn ($domain) => $this->action($domain)); + ->inject('queueForCertificates') + ->callback(fn (string $domain, Certificate $queueForCertificates) => $this->action($domain, $queueForCertificates)); } - public function action(string $domain): void + public function action(string $domain, Certificate $queueForCertificates): void { Console::success('Scheduling a job to issue a TLS certificate for domain: ' . $domain); - (new Certificate()) + $queueForCertificates ->setDomain(new Document([ 'domain' => $domain ]))