diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index 0245084b5e..db5a0532f1 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -1013,16 +1013,6 @@ class Builds extends Action Console::log('Deployment activated'); } - /** Screenshot site */ - if ($resource->getCollection() === 'sites') { - $queueForScreenshots - ->setDeploymentId($deployment->getId()) - ->setProject($project) - ->trigger(); - - Console::log('Site screenshot queued'); - } - $this->afterDeploymentSuccess( $project, $deployment, @@ -1123,6 +1113,16 @@ class Builds extends Action $dbForPlatform->updateDocument('schedules', $schedule->getId(), $schedule); } + /** Screenshot site */ + if ($resource->getCollection() === 'sites') { + $queueForScreenshots + ->setDeploymentId($deployment->getId()) + ->setProject($project) + ->trigger(); + + Console::log('Site screenshot queued'); + } + Console::info('Deployment action finished'); } catch (\Throwable $th) { Console::warning('Build failed:'); diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Screenshots.php b/src/Appwrite/Platform/Modules/Functions/Workers/Screenshots.php index 8e0d54dc1b..5acc7fd83f 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Screenshots.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Screenshots.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Functions\Workers; -use Ahc\Jwt\JWT; use Appwrite\Event\Realtime; use Appwrite\Permission; use Appwrite\Role;