mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Merge pull request #10541 from appwrite/update-after-build
chore: update afterbuild fn
This commit is contained in:
commit
aa4a58c8aa
1 changed files with 15 additions and 5 deletions
|
|
@ -899,7 +899,7 @@ class Builds extends Action
|
||||||
|
|
||||||
Console::log('Build details stored');
|
Console::log('Build details stored');
|
||||||
|
|
||||||
$this->afterBuildSuccess($queueForRealtime, $dbForProject, $deployment);
|
$this->afterBuildSuccess($queueForRealtime, $dbForProject, $deployment, $runtime);
|
||||||
$logs = $deployment->getAttribute('buildLogs', '');
|
$logs = $deployment->getAttribute('buildLogs', '');
|
||||||
|
|
||||||
/** Screenshot site */
|
/** Screenshot site */
|
||||||
|
|
@ -1391,12 +1391,22 @@ class Builds extends Action
|
||||||
* @param Database $dbForProject
|
* @param Database $dbForProject
|
||||||
* @param Document $deployment
|
* @param Document $deployment
|
||||||
* @return void
|
* @return void
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
protected function afterBuildSuccess(Realtime $queueForRealtime, Database $dbForProject, Document &$deployment): void
|
protected function afterBuildSuccess(Realtime $queueForRealtime, Database $dbForProject, Document &$deployment, array $runtime): void
|
||||||
{
|
{
|
||||||
assert($queueForRealtime instanceof Realtime);
|
if (!($queueForRealtime instanceof Realtime)) {
|
||||||
assert($dbForProject instanceof Database);
|
throw new Exception('queueForRealtime must be an instance of Realtime');
|
||||||
assert($deployment instanceof Document);
|
}
|
||||||
|
if (!($dbForProject instanceof Database)) {
|
||||||
|
throw new Exception('dbForProject must be an instance of Database');
|
||||||
|
}
|
||||||
|
if (!($deployment instanceof Document)) {
|
||||||
|
throw new Exception('deployment must be an instance of Document');
|
||||||
|
}
|
||||||
|
if (!is_array($runtime)) {
|
||||||
|
throw new Exception('runtime must be an array');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRuntime(Document $resource, string $version): array
|
protected function getRuntime(Document $resource, string $version): array
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue