chore: us spelling of canceled
This commit is contained in:
parent
d6bfe084c1
commit
7559c9af68
|
@ -543,7 +543,7 @@ return [
|
|||
],
|
||||
Exception::BUILD_ALREADY_COMPLETED => [
|
||||
'name' => Exception::BUILD_ALREADY_COMPLETED,
|
||||
'description' => 'Build with the requested ID is already completed and cannot be cancelled.',
|
||||
'description' => 'Build with the requested ID is already completed and cannot be canceled.',
|
||||
'code' => 400,
|
||||
],
|
||||
|
||||
|
|
|
@ -1532,7 +1532,7 @@ App::patch('/v1/functions/:functionId/deployments/:deploymentId/build')
|
|||
'startTime' => DateTime::now(),
|
||||
'deploymentInternalId' => $deployment->getInternalId(),
|
||||
'deploymentId' => $deployment->getId(),
|
||||
'status' => 'cancelled',
|
||||
'status' => 'canceled',
|
||||
'path' => '',
|
||||
'runtime' => $function->getAttribute('runtime'),
|
||||
'source' => $deployment->getAttribute('path', ''),
|
||||
|
@ -1558,7 +1558,7 @@ App::patch('/v1/functions/:functionId/deployments/:deploymentId/build')
|
|||
$build = $dbForProject->updateDocument('builds', $build->getId(), $build->setAttributes([
|
||||
'endTime' => DateTime::now(),
|
||||
'duration' => $duration,
|
||||
'status' => 'cancelled'
|
||||
'status' => 'canceled'
|
||||
]));
|
||||
}
|
||||
|
||||
|
|
|
@ -181,8 +181,8 @@ class Builds extends Action
|
|||
$deployment->setAttribute('buildId', $build->getId());
|
||||
$deployment->setAttribute('buildInternalId', $build->getInternalId());
|
||||
$deployment = $dbForProject->updateDocument('deployments', $deployment->getId(), $deployment);
|
||||
} elseif ($build->getAttribute('status') === 'cancelled') {
|
||||
Console::info('Build has been cancelled');
|
||||
} elseif ($build->getAttribute('status') === 'canceled') {
|
||||
Console::info('Build has been canceled');
|
||||
return;
|
||||
} else {
|
||||
$build = $dbForProject->getDocument('builds', $buildId);
|
||||
|
@ -226,8 +226,8 @@ class Builds extends Action
|
|||
$stderr = '';
|
||||
Console::execute('mkdir -p /tmp/builds/' . \escapeshellcmd($buildId), '', $stdout, $stderr);
|
||||
|
||||
if ($dbForProject->getDocument('builds', $buildId)->getAttribute('status') === 'cancelled') {
|
||||
Console::info('Build has been cancelled');
|
||||
if ($dbForProject->getDocument('builds', $buildId)->getAttribute('status') === 'canceled') {
|
||||
Console::info('Build has been canceled');
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -407,8 +407,8 @@ class Builds extends Action
|
|||
$response = null;
|
||||
$err = null;
|
||||
|
||||
if ($dbForProject->getDocument('builds', $buildId)->getAttribute('status') === 'cancelled') {
|
||||
Console::info('Build has been cancelled');
|
||||
if ($dbForProject->getDocument('builds', $buildId)->getAttribute('status') === 'canceled') {
|
||||
Console::info('Build has been canceled');
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -478,8 +478,8 @@ class Builds extends Action
|
|||
]);
|
||||
|
||||
if ($err) {
|
||||
if ($dbForProject->getDocument('builds', $buildId)->getAttribute('status') === 'cancelled') {
|
||||
Console::info('Build has been cancelled');
|
||||
if ($dbForProject->getDocument('builds', $buildId)->getAttribute('status') === 'canceled') {
|
||||
Console::info('Build has been canceled');
|
||||
return;
|
||||
}
|
||||
throw $err;
|
||||
|
@ -511,8 +511,8 @@ class Builds extends Action
|
|||
$function = $dbForProject->updateDocument('functions', $function->getId(), $function);
|
||||
}
|
||||
|
||||
if ($dbForProject->getDocument('builds', $buildId)->getAttribute('status') === 'cancelled') {
|
||||
Console::info('Build has been cancelled');
|
||||
if ($dbForProject->getDocument('builds', $buildId)->getAttribute('status') === 'canceled') {
|
||||
Console::info('Build has been canceled');
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -526,8 +526,8 @@ class Builds extends Action
|
|||
->setAttribute('active', !empty($function->getAttribute('schedule')) && !empty($function->getAttribute('deployment')));
|
||||
Authorization::skip(fn () => $dbForConsole->updateDocument('schedules', $schedule->getId(), $schedule));
|
||||
} catch (\Throwable $th) {
|
||||
if ($dbForProject->getDocument('builds', $buildId)->getAttribute('status') === 'cancelled') {
|
||||
Console::info('Build has been cancelled');
|
||||
if ($dbForProject->getDocument('builds', $buildId)->getAttribute('status') === 'canceled') {
|
||||
Console::info('Build has been canceled');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -488,9 +488,9 @@ class FunctionsCustomServerTest extends Scope
|
|||
]);
|
||||
|
||||
$this->assertEquals(200, $cancel['headers']['status-code']);
|
||||
$this->assertEquals('cancelled', $cancel['body']['status']);
|
||||
$this->assertEquals('canceled', $cancel['body']['status']);
|
||||
|
||||
// Confirm the deployment is cancelled
|
||||
// Confirm the deployment is canceled
|
||||
$deployment = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/deployments/' . $deploymentId, [
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
|
@ -498,7 +498,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
]);
|
||||
|
||||
$this->assertEquals(200, $deployment['headers']['status-code']);
|
||||
$this->assertEquals('cancelled', $deployment['body']['status']);
|
||||
$this->assertEquals('canceled', $deployment['body']['status']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue