Merge pull request #1629 from appwrite/0.10.x

master <= 0.10.x
This commit is contained in:
Torsten Dittmann 2021-09-15 17:36:51 +02:00 committed by GitHub
commit da8000539c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 20 deletions

View File

@ -1,3 +1,8 @@
# Version 0.10.4
## Bugs
- Fixed another memory leak in realtime service (#1627)
# Version 0.10.3
## Bugs

View File

@ -57,7 +57,7 @@ docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:0.10.3
appwrite/appwrite:0.10.4
```
### Windows
@ -69,7 +69,7 @@ docker run -it --rm ^
--volume //var/run/docker.sock:/var/run/docker.sock ^
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
--entrypoint="install" ^
appwrite/appwrite:0.10.3
appwrite/appwrite:0.10.4
```
#### PowerShell
@ -79,7 +79,7 @@ docker run -it --rm ,
--volume /var/run/docker.sock:/var/run/docker.sock ,
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ,
--entrypoint="install" ,
appwrite/appwrite:0.10.3
appwrite/appwrite:0.10.4
```
Once the Docker installation completes, go to http://localhost to access the Appwrite console from your browser. Please note that on non-linux native hosts, the server might take a few minutes to start after installation completes.

View File

@ -49,7 +49,7 @@ const APP_MODE_DEFAULT = 'default';
const APP_MODE_ADMIN = 'admin';
const APP_PAGING_LIMIT = 12;
const APP_CACHE_BUSTER = 160;
const APP_VERSION_STABLE = '0.10.3';
const APP_VERSION_STABLE = '0.10.4';
const APP_STORAGE_UPLOADS = '/storage/uploads';
const APP_STORAGE_FUNCTIONS = '/storage/functions';
const APP_STORAGE_CACHE = '/storage/cache';

View File

@ -103,8 +103,6 @@ $server->onStart(function () use ($stats, $register, $containerId, &$documentId)
* Save current connections to the Database every 5 seconds.
*/
Timer::tick(5000, function () use ($stats, $getConsoleDb, $containerId, &$documentId) {
[$consoleDb, $returnConsoleDb] = call_user_func($getConsoleDb);
foreach ($stats as $projectId => $value) {
if (empty($value['connections']) && empty($value['messages'])) {
continue;
@ -129,8 +127,6 @@ $server->onStart(function () use ($stats, $register, $containerId, &$documentId)
if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') {
$usage->trigger();
}
unset($usage, $connections, $messages);
}
$payload = [];
foreach ($stats as $projectId => $value) {
@ -141,19 +137,21 @@ $server->onStart(function () use ($stats, $register, $containerId, &$documentId)
if (empty($payload)) {
return;
}
$document = [
'$id' => $documentId,
'$collection' => Database::SYSTEM_COLLECTION_CONNECTIONS,
'$permissions' => [
'read' => ['*'],
'write' => ['*'],
],
'container' => $containerId,
'timestamp' => time(),
'value' => json_encode($payload)
];
try {
$document = $consoleDb->updateDocument($document);
[$consoleDb, $returnConsoleDb] = call_user_func($getConsoleDb);
$consoleDb->updateDocument([
'$id' => $documentId,
'$collection' => Database::SYSTEM_COLLECTION_CONNECTIONS,
'$permissions' => [
'read' => ['*'],
'write' => ['*'],
],
'container' => $containerId,
'timestamp' => time(),
'value' => json_encode($payload)
]);
} catch (\Throwable $th) {
Console::error('[Error] Type: ' . get_class($th));
Console::error('[Error] Message: ' . $th->getMessage());

View File

@ -47,6 +47,7 @@ abstract class Migration
'0.10.1' => 'V09',
'0.10.2' => 'V09',
'0.10.3' => 'V09',
'0.10.4' => 'V09',
];
/**