mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
addressing comments
This commit is contained in:
@@ -84,8 +84,8 @@ _APP_MAINTENANCE_RETENTION_AUDIT=1209600
|
||||
_APP_USAGE_TIMESERIES_INTERVAL=2
|
||||
_APP_USAGE_DATABASE_INTERVAL=15
|
||||
_APP_USAGE_STATS=enabled
|
||||
_APP_LOGGING_PROVIDER=sentry
|
||||
_APP_LOGGING_CONFIG=4190483bb7d14d659e526aa61b0c7b5e;4504077395230720
|
||||
_APP_LOGGING_PROVIDER=
|
||||
_APP_LOGGING_CONFIG=
|
||||
_APP_REGION=nyc1
|
||||
DOCKERHUB_PULL_USERNAME=
|
||||
DOCKERHUB_PULL_PASSWORD=
|
||||
|
||||
+3
-6
@@ -3,17 +3,14 @@
|
||||
require_once __DIR__ . '/init.php';
|
||||
|
||||
use Appwrite\DSN\DSN;
|
||||
use Appwrite\Extend\Exception;
|
||||
use Appwrite\URL\URL as AppwriteURL;
|
||||
use Swoole\Runtime;
|
||||
use Utopia\App;
|
||||
use Utopia\Cache\Adapter\Sharding;
|
||||
use Utopia\Cache\Cache;
|
||||
use Utopia\CLI\Console;
|
||||
use Utopia\Config\Config;
|
||||
use Utopia\Database\Database;
|
||||
use Utopia\Database\Validator\Authorization;
|
||||
use Utopia\Logger\Log;
|
||||
use Utopia\Logger\Logger;
|
||||
use Utopia\Queue\Server;
|
||||
use Utopia\Registry\Registry;
|
||||
use Utopia\Queue;
|
||||
@@ -71,8 +68,8 @@ $fallbackForRedis = AppwriteURL::unparse([
|
||||
$connection = App::getEnv('_APP_CONNECTIONS_QUEUE', $fallbackForRedis);
|
||||
$dsns = explode(',', $connection ?? '');
|
||||
|
||||
if (empty($dsns[0])) {
|
||||
Console::error("Dsn not found");
|
||||
if (empty($dsns)) {
|
||||
throw new Exception(Exception::GENERAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
$dsn = explode('=', $dsns[0]);
|
||||
|
||||
@@ -92,7 +92,7 @@ function handle($dbForConsole, $regions, $stack): void
|
||||
if ($response['status'] !== Response::STATUS_CODE_OK) {
|
||||
Console::error("[{$time}] Request to {$code} has failed");
|
||||
|
||||
$dbForConsole->createDocument('syncs', new Document([
|
||||
$dbForConsole->createDocument('sync', new Document([
|
||||
'region' => App::getEnv('_APP_REGION'),
|
||||
'target' => $code,
|
||||
'keys' => $stack,
|
||||
@@ -103,8 +103,8 @@ function handle($dbForConsole, $regions, $stack): void
|
||||
}
|
||||
}
|
||||
|
||||
$adapter = new Queue\Adapter\Swoole($redisConnection, $workerNumber, 'syncOut');
|
||||
$server = new Queue\Server($adapter);
|
||||
$adapter = new Queue\Adapter\Swoole($redisConnection, $workerNumber, 'syncOut');
|
||||
$server = new Queue\Server($adapter);
|
||||
|
||||
$server->job()
|
||||
->inject('message')
|
||||
|
||||
Reference in New Issue
Block a user