mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 00:49:02 +00:00
Merge branch '1.8.x' into feat-integer-format-int64
This commit is contained in:
commit
5697d983d0
1 changed files with 25 additions and 0 deletions
|
|
@ -1024,6 +1024,11 @@ class Builds extends Action
|
|||
Console::log('Deployment activated');
|
||||
}
|
||||
|
||||
$this->afterDeploymentSuccess(
|
||||
$project,
|
||||
$deployment,
|
||||
);
|
||||
|
||||
// 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())
|
||||
|
|
@ -1256,6 +1261,26 @@ class Builds extends Action
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook to run after deployment is activated
|
||||
*
|
||||
* @param Document $project
|
||||
* @param Document $deployment
|
||||
* @return void
|
||||
*/
|
||||
protected function afterDeploymentSuccess(
|
||||
Document $project,
|
||||
Document $deployment,
|
||||
): void {
|
||||
if (!($project instanceof Document)) {
|
||||
throw new Exception('project must be an instance of Document');
|
||||
}
|
||||
|
||||
if (!($deployment instanceof Document)) {
|
||||
throw new Exception('deployment must be an instance of Document');
|
||||
}
|
||||
}
|
||||
|
||||
protected function getRuntime(Document $resource, string $version): array
|
||||
{
|
||||
$runtimes = Config::getParam($version === 'v2' ? 'runtimes-v2' : 'runtimes', []);
|
||||
|
|
|
|||
Loading…
Reference in a new issue