mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix: realtime startup
This commit is contained in:
+2
-1
@@ -110,6 +110,7 @@ function getDatabase(Registry &$register, string $namespace)
|
||||
};
|
||||
|
||||
$server->onStart(function () use ($stats, $register, $containerId, &$statsDocument, $logError) {
|
||||
sleep(5); // wait for the initial database schema to be ready
|
||||
Console::success('Server started succefully');
|
||||
|
||||
/**
|
||||
@@ -138,7 +139,7 @@ $server->onStart(function () use ($stats, $register, $containerId, &$statsDocume
|
||||
/**
|
||||
* Save current connections to the Database every 5 seconds.
|
||||
*/
|
||||
Timer::tick(5000, function () use ($register, $stats, $containerId, &$statsDocument, $logError) {
|
||||
Timer::tick(5000, function () use ($register, $stats, &$statsDocument, $logError) {
|
||||
/** @var Document $statsDocument */
|
||||
foreach ($stats as $projectId => $value) {
|
||||
$connections = $stats->get($projectId, 'connections') ?? 0;
|
||||
|
||||
@@ -40,9 +40,6 @@ trait RealtimeBase
|
||||
|
||||
public function testConnectionFailureMissingChannels(): void
|
||||
{
|
||||
/**
|
||||
* Test for FAILURE
|
||||
*/
|
||||
$client = $this->getWebsocket();
|
||||
$payload = json_decode($client->receive(), true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user