Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/Appwrite/Platform/Modules/Functions/Workers/Builds.php
Original file line number Diff line number Diff line change
Expand Up @@ -1107,10 +1107,6 @@ protected function buildDeployment(
$resource = $dbForProject->updateDocument($resource->getCollection(), $resource->getId(), new Document(['latestDeploymentStatus' => $deployment->getAttribute('status', '')]));
}

$queueForRealtime
->setPayload($deployment->getArrayCopy())
->trigger();

if ($isVcsEnabled) {
$this->runGitAction('ready', $github, $providerCommitHash, $owner, $repositoryName, $project, $resource, $deployment->getId(), $dbForProject, $dbForPlatform, $queueForRealtime);
}
Expand Down Expand Up @@ -1198,6 +1194,11 @@ protected function buildDeployment(
Console::log('Deployment activated');
}

// Send realtime event after updating the associated resource so that Console will have the resource's deployment details when re-fetching.
$queueForRealtime
->setPayload($deployment->getArrayCopy())
->trigger();

if ($resource->getCollection() === 'sites') {
// VCS branch
$branchName = $deployment->getAttribute('providerBranch');
Expand Down