mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 17:08:45 +00:00
fix: Send deployment ready event after updating associated resource
This commit is contained in:
parent
04fdab0920
commit
52d656194c
1 changed files with 5 additions and 4 deletions
|
|
@ -1097,10 +1097,6 @@ class Builds extends Action
|
|||
$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);
|
||||
}
|
||||
|
|
@ -1188,6 +1184,11 @@ class Builds extends Action
|
|||
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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue