mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 08:28:42 +00:00
Fix wrong device type
This commit is contained in:
parent
9ba609c46e
commit
dc1d9fa635
1 changed files with 3 additions and 3 deletions
|
|
@ -112,6 +112,8 @@ class BuildsV1 extends Worker
|
|||
|
||||
$isNewBuild = empty($buildId);
|
||||
|
||||
$deviceFunctions = $this->getFunctionsDevice($project->getId());
|
||||
|
||||
if ($isNewBuild) {
|
||||
$buildId = ID::unique();
|
||||
$build = $dbForProject->createDocument('builds', new Document([
|
||||
|
|
@ -124,7 +126,7 @@ class BuildsV1 extends Worker
|
|||
'path' => '',
|
||||
'runtime' => $function->getAttribute('runtime'),
|
||||
'source' => $deployment->getAttribute('path', ''),
|
||||
'sourceType' => strtolower(App::getEnv('_APP_STORAGE_DEVICE', Storage::DEVICE_LOCAL)),
|
||||
'sourceType' => strtolower($deviceFunctions->getType()),
|
||||
'logs' => '',
|
||||
'endTime' => null,
|
||||
'duration' => 0,
|
||||
|
|
@ -254,8 +256,6 @@ class BuildsV1 extends Worker
|
|||
|
||||
Console::execute('tar --exclude code.tar.gz -czf ' . $tmpPathFile . ' -C /tmp/builds/' . \escapeshellcmd($buildId) . '/code' . (empty($rootDirectory) ? '' : '/' . $rootDirectory) . ' .', '', $stdout, $stderr);
|
||||
|
||||
$deviceFunctions = $this->getFunctionsDevice($project->getId());
|
||||
|
||||
$localDevice = new Local();
|
||||
$buffer = $localDevice->read($tmpPathFile);
|
||||
$mimeType = $localDevice->getFileMimeType($tmpPathFile);
|
||||
|
|
|
|||
Loading…
Reference in a new issue