Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit da80005

Browse files
Merge pull request appwrite#1629 from appwrite/0.10.x
master <= 0.10.x
2 parents ca39f1e + 8d90d1d commit da80005

File tree

5 files changed

+24
-20
lines changed

5 files changed

+24
-20
lines changed

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Version 0.10.4
2+
3+
## Bugs
4+
- Fixed another memory leak in realtime service (#1627)
5+
16
# Version 0.10.3
27

38
## Bugs

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ docker run -it --rm \
5757
--volume /var/run/docker.sock:/var/run/docker.sock \
5858
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
5959
--entrypoint="install" \
60-
appwrite/appwrite:0.10.3
60+
appwrite/appwrite:0.10.4
6161
```
6262

6363
### Windows
@@ -69,7 +69,7 @@ docker run -it --rm ^
6969
--volume //var/run/docker.sock:/var/run/docker.sock ^
7070
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
7171
--entrypoint="install" ^
72-
appwrite/appwrite:0.10.3
72+
appwrite/appwrite:0.10.4
7373
```
7474

7575
#### PowerShell
@@ -79,7 +79,7 @@ docker run -it --rm ,
7979
--volume /var/run/docker.sock:/var/run/docker.sock ,
8080
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ,
8181
--entrypoint="install" ,
82-
appwrite/appwrite:0.10.3
82+
appwrite/appwrite:0.10.4
8383
```
8484

8585
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.

app/init.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
const APP_MODE_ADMIN = 'admin';
5050
const APP_PAGING_LIMIT = 12;
5151
const APP_CACHE_BUSTER = 160;
52-
const APP_VERSION_STABLE = '0.10.3';
52+
const APP_VERSION_STABLE = '0.10.4';
5353
const APP_STORAGE_UPLOADS = '/storage/uploads';
5454
const APP_STORAGE_FUNCTIONS = '/storage/functions';
5555
const APP_STORAGE_CACHE = '/storage/cache';

app/realtime.php

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ function () use ($register, $db, $cache) {
103103
* Save current connections to the Database every 5 seconds.
104104
*/
105105
Timer::tick(5000, function () use ($stats, $getConsoleDb, $containerId, &$documentId) {
106-
[$consoleDb, $returnConsoleDb] = call_user_func($getConsoleDb);
107-
108106
foreach ($stats as $projectId => $value) {
109107
if (empty($value['connections']) && empty($value['messages'])) {
110108
continue;
@@ -129,8 +127,6 @@ function () use ($register, $db, $cache) {
129127
if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') {
130128
$usage->trigger();
131129
}
132-
133-
unset($usage, $connections, $messages);
134130
}
135131
$payload = [];
136132
foreach ($stats as $projectId => $value) {
@@ -141,19 +137,21 @@ function () use ($register, $db, $cache) {
141137
if (empty($payload)) {
142138
return;
143139
}
144-
$document = [
145-
'$id' => $documentId,
146-
'$collection' => Database::SYSTEM_COLLECTION_CONNECTIONS,
147-
'$permissions' => [
148-
'read' => ['*'],
149-
'write' => ['*'],
150-
],
151-
'container' => $containerId,
152-
'timestamp' => time(),
153-
'value' => json_encode($payload)
154-
];
140+
155141
try {
156-
$document = $consoleDb->updateDocument($document);
142+
[$consoleDb, $returnConsoleDb] = call_user_func($getConsoleDb);
143+
144+
$consoleDb->updateDocument([
145+
'$id' => $documentId,
146+
'$collection' => Database::SYSTEM_COLLECTION_CONNECTIONS,
147+
'$permissions' => [
148+
'read' => ['*'],
149+
'write' => ['*'],
150+
],
151+
'container' => $containerId,
152+
'timestamp' => time(),
153+
'value' => json_encode($payload)
154+
]);
157155
} catch (\Throwable $th) {
158156
Console::error('[Error] Type: ' . get_class($th));
159157
Console::error('[Error] Message: ' . $th->getMessage());

src/Appwrite/Migration/Migration.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ abstract class Migration
4747
'0.10.1' => 'V09',
4848
'0.10.2' => 'V09',
4949
'0.10.3' => 'V09',
50+
'0.10.4' => 'V09',
5051
];
5152

5253
/**

0 commit comments

Comments
 (0)