feat: sync branches
This commit is contained in:
commit
cd45045559
6 changed files with 56 additions and 24 deletions
|
@ -269,6 +269,7 @@ RUN chmod +x /usr/local/bin/doctor && \
|
|||
chmod +x /usr/local/bin/install && \
|
||||
chmod +x /usr/local/bin/migrate && \
|
||||
chmod +x /usr/local/bin/realtime && \
|
||||
chmod +x /usr/local/bin/executor && \
|
||||
chmod +x /usr/local/bin/schedule && \
|
||||
chmod +x /usr/local/bin/sdks && \
|
||||
chmod +x /usr/local/bin/specs && \
|
||||
|
@ -282,8 +283,7 @@ RUN chmod +x /usr/local/bin/doctor && \
|
|||
chmod +x /usr/local/bin/worker-functions && \
|
||||
chmod +x /usr/local/bin/worker-builds && \
|
||||
chmod +x /usr/local/bin/worker-mails && \
|
||||
chmod +x /usr/local/bin/worker-webhooks && \
|
||||
chmod +x /usr/local/bin/executor
|
||||
chmod +x /usr/local/bin/worker-webhooks
|
||||
|
||||
# Letsencrypt Permissions
|
||||
RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/
|
||||
|
|
|
@ -377,7 +377,6 @@ $cli
|
|||
$loopTook = microtime(true) - $loopStart;
|
||||
$now = date('d-m-Y H:i:s', time());
|
||||
Console::info("[{$now}] Aggregation took {$loopTook} seconds");
|
||||
Console::warning($e->getTraceAsString());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -174,16 +174,6 @@ services:
|
|||
- appwrite
|
||||
environment:
|
||||
- _APP_ENV
|
||||
- _APP_OPENSSL_KEY_V1
|
||||
- _APP_REDIS_HOST
|
||||
- _APP_REDIS_PORT
|
||||
- _APP_REDIS_USER
|
||||
- _APP_REDIS_PASS
|
||||
- _APP_DB_HOST
|
||||
- _APP_DB_PORT
|
||||
- _APP_DB_SCHEMA
|
||||
- _APP_DB_USER
|
||||
- _APP_DB_PASS
|
||||
- _APP_FUNCTIONS_TIMEOUT
|
||||
- _APP_FUNCTIONS_BUILD_TIMEOUT
|
||||
- _APP_FUNCTIONS_CONTAINERS
|
||||
|
@ -193,13 +183,11 @@ services:
|
|||
- _APP_FUNCTIONS_MEMORY_SWAP
|
||||
- _APP_EXECUTOR_SECRET
|
||||
- _APP_EXECUTOR_RUNTIME_NETWORK
|
||||
- _APP_USAGE_STATS
|
||||
- _APP_STATSD_HOST
|
||||
- _APP_STATSD_PORT
|
||||
- _APP_LOGGING_PROVIDER
|
||||
- _APP_LOGGING_CONFIG
|
||||
- DOCKERHUB_PULL_USERNAME
|
||||
- DOCKERHUB_PULL_PASSWORD
|
||||
- OPENRUNTIMES_INACTIVE_THRESHOLD
|
||||
|
||||
appwrite-worker-database:
|
||||
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
|
||||
|
|
|
@ -24,7 +24,7 @@ class Build extends Model
|
|||
])
|
||||
->addRule('deploymentId', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'The deployment that created this build',
|
||||
'description' => 'The deployment that created this build.',
|
||||
'default' => '',
|
||||
'example' => '5e5ea5c16897e',
|
||||
])
|
||||
|
@ -35,7 +35,7 @@ class Build extends Model
|
|||
// Building - The deployment is currently being built
|
||||
->addRule('status', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'The build status.',
|
||||
'description' => 'The build status. There are a few different types and each one means something different. \nFailed - The deployment build has failed. More details can usually be found in buildStderr\nReady - The deployment build was successful and the deployment is ready to be deployed\nProcessing - The deployment is currently waiting to have a build triggered\nBuilding - The deployment is currently being built',
|
||||
'default' => '',
|
||||
'example' => 'ready',
|
||||
])
|
||||
|
@ -71,17 +71,17 @@ class Build extends Model
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName():string
|
||||
public function getName(): string
|
||||
{
|
||||
return 'Build';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Collection
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType():string
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_BUILD;
|
||||
}
|
||||
|
|
|
@ -122,9 +122,12 @@ class Func extends Model
|
|||
}
|
||||
|
||||
/**
|
||||
* Get Collection
|
||||
* Filter Function
|
||||
*
|
||||
* @return string
|
||||
* Automatically converts a [] default to a stdClass, this is called while grabbing the document.
|
||||
*
|
||||
* @param Document $document
|
||||
* @return Document
|
||||
*/
|
||||
public function filter(Document $document): Document
|
||||
{
|
||||
|
|
|
@ -31,6 +31,25 @@ class Executor
|
|||
$this->endpoint = $endpoint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create runtime
|
||||
*
|
||||
* Launches a runtime container for a deployment ready for execution
|
||||
*
|
||||
* @param string $functionId
|
||||
* @param string $deploymentId
|
||||
* @param string $projectId
|
||||
* @param string $source
|
||||
* @param string $runtime
|
||||
* @param string $baseImage
|
||||
* @param bool $remove
|
||||
* @param string $entrypoint
|
||||
* @param string $workdir
|
||||
* @param string $destinaction
|
||||
* @param string $network
|
||||
* @param array $vars
|
||||
* @param array $commands
|
||||
*/
|
||||
public function createRuntime(
|
||||
string $deploymentId,
|
||||
string $projectId,
|
||||
|
@ -74,6 +93,14 @@ class Executor
|
|||
return $response['body'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete Runtime
|
||||
*
|
||||
* Deletes a runtime and cleans up any containers remaining.
|
||||
*
|
||||
* @param string $projectId
|
||||
* @param string $deploymentId
|
||||
*/
|
||||
public function deleteRuntime(string $projectId, string $deploymentId)
|
||||
{
|
||||
$runtimeId = "$projectId-$deploymentId";
|
||||
|
@ -95,6 +122,22 @@ class Executor
|
|||
return $response['body'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an execution
|
||||
*
|
||||
* @param string $projectId
|
||||
* @param string $functionId
|
||||
* @param string $deploymentId
|
||||
* @param string $path
|
||||
* @param array $vars
|
||||
* @param string $entrypoint
|
||||
* @param string $data
|
||||
* @param string runtime
|
||||
* @param string $baseImage
|
||||
* @param int $timeout
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function createExecution(
|
||||
string $projectId,
|
||||
string $deploymentId,
|
||||
|
@ -106,7 +149,6 @@ class Executor
|
|||
string $baseImage,
|
||||
$timeout
|
||||
) {
|
||||
|
||||
$route = "/execution";
|
||||
$headers = [
|
||||
'content-type' => 'application/json',
|
||||
|
|
Loading…
Reference in a new issue