Transfer for Git deploys to prevent memory issues
This commit is contained in:
parent
9ba609c46e
commit
1669ead4e0
|
@ -257,11 +257,8 @@ class BuildsV1 extends Worker
|
|||
$deviceFunctions = $this->getFunctionsDevice($project->getId());
|
||||
|
||||
$localDevice = new Local();
|
||||
$buffer = $localDevice->read($tmpPathFile);
|
||||
$mimeType = $localDevice->getFileMimeType($tmpPathFile);
|
||||
|
||||
$path = $deviceFunctions->getPath($deployment->getId() . '.' . \pathinfo('code.tar.gz', PATHINFO_EXTENSION));
|
||||
$result = $deviceFunctions->write($path, $buffer, $mimeType);
|
||||
$result = $localDevice->transfer($tmpPathFile, $path, $deviceFunctions);
|
||||
|
||||
if (!$result) {
|
||||
throw new \Exception("Unable to move file");
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
"utopia-php/preloader": "0.2.*",
|
||||
"utopia-php/queue": "0.5.*",
|
||||
"utopia-php/registry": "0.5.*",
|
||||
"utopia-php/storage": "0.14.*",
|
||||
"utopia-php/storage": "0.17.*",
|
||||
"utopia-php/swoole": "0.5.*",
|
||||
"utopia-php/vcs": "0.5.*",
|
||||
"utopia-php/websocket": "0.1.*",
|
||||
|
|
20
composer.lock
generated
20
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "54d54b76790d03a0bcfb9bbd23ed1009",
|
||||
"content-hash": "13a3bdc7c1dec5756bf58ec73a49753d",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/jwt",
|
||||
|
@ -2998,16 +2998,16 @@
|
|||
},
|
||||
{
|
||||
"name": "utopia-php/storage",
|
||||
"version": "0.14.0",
|
||||
"version": "0.17.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/storage.git",
|
||||
"reference": "eda6651ac16884dc2a79ecb984ea591ba1ed498c"
|
||||
"reference": "efec5376c02d3d8330f1beb1469e6d6e313e21ee"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/storage/zipball/eda6651ac16884dc2a79ecb984ea591ba1ed498c",
|
||||
"reference": "eda6651ac16884dc2a79ecb984ea591ba1ed498c",
|
||||
"url": "https://api.github.com/repos/utopia-php/storage/zipball/efec5376c02d3d8330f1beb1469e6d6e313e21ee",
|
||||
"reference": "efec5376c02d3d8330f1beb1469e6d6e313e21ee",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3015,10 +3015,12 @@
|
|||
"ext-fileinfo": "*",
|
||||
"ext-lz4": "*",
|
||||
"ext-snappy": "*",
|
||||
"ext-xz": "*",
|
||||
"ext-zlib": "*",
|
||||
"ext-zstd": "*",
|
||||
"php": ">=8.0",
|
||||
"utopia-php/framework": "0.*.*"
|
||||
"utopia-php/framework": "0.*.*",
|
||||
"utopia-php/system": "0.*.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"laravel/pint": "1.2.*",
|
||||
|
@ -3045,9 +3047,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/storage/issues",
|
||||
"source": "https://github.com/utopia-php/storage/tree/0.14.0"
|
||||
"source": "https://github.com/utopia-php/storage/tree/0.17.0"
|
||||
},
|
||||
"time": "2023-03-15T00:16:34+00:00"
|
||||
"time": "2023-08-21T11:28:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/swoole",
|
||||
|
@ -6027,5 +6029,5 @@
|
|||
"platform-overrides": {
|
||||
"php": "8.0"
|
||||
},
|
||||
"plugin-api-version": "2.6.0"
|
||||
"plugin-api-version": "2.3.0"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue