Merge branch 'feat-db-per-process' of github.com:appwrite/appwrite into feat-db-per-process
# Conflicts: # bin/worker-databases # src/Appwrite/Event/Database.php # src/Appwrite/Platform/Workers/Databases.php
This commit is contained in:
commit
6f42305484
7 changed files with 4 additions and 8 deletions
|
@ -1110,7 +1110,7 @@ App::put('/v1/account/sessions/magic-url')
|
|||
->inject('locale')
|
||||
->inject('geodb')
|
||||
->inject('queueForEvents')
|
||||
->action(function (string $userId, string $secret, Request $request, Response $response,Document $user, Database $dbForProject, Document $project, Locale $locale, Reader $geodb, Event $queueForEvents) {
|
||||
->action(function (string $userId, string $secret, Request $request, Response $response, Document $user, Database $dbForProject, Document $project, Locale $locale, Reader $geodb, Event $queueForEvents) {
|
||||
|
||||
/** @var Utopia\Database\Document $user */
|
||||
|
||||
|
|
|
@ -1680,8 +1680,6 @@ App::post('/v1/functions/:functionId/executions')
|
|||
$execution->setAttribute('logs', $executionResponse['logs']);
|
||||
$execution->setAttribute('errors', $executionResponse['errors']);
|
||||
$execution->setAttribute('duration', $executionResponse['duration']);
|
||||
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
$durationEnd = \microtime(true);
|
||||
|
||||
|
|
|
@ -257,7 +257,7 @@ App::put('/v1/teams/:teamId')
|
|||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('queueForEvents')
|
||||
->action(function (string $teamId, string $name, ?\DateTime $requestTimestamp , Response $response, Database $dbForProject, Event $queueForEvents) {
|
||||
->action(function (string $teamId, string $name, ?\DateTime $requestTimestamp, Response $response, Database $dbForProject, Event $queueForEvents) {
|
||||
|
||||
$team = $dbForProject->getDocument('teams', $teamId);
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ App::post('/v1/users')
|
|||
->inject('project')
|
||||
->inject('dbForProject')
|
||||
->inject('queueForEvents')
|
||||
->action(function (string $userId, ?string $email, ?string $phone, ?string $password, string $name, Response $response,Document $project, Database $dbForProject, Event $queueForEvents) {
|
||||
->action(function (string $userId, ?string $email, ?string $phone, ?string $password, string $name, Response $response, Document $project, Database $dbForProject, Event $queueForEvents) {
|
||||
$user = createUser('plaintext', '{}', $userId, $email, $password, $phone, $name, $project, $dbForProject, $queueForEvents);
|
||||
|
||||
$response
|
||||
|
|
|
@ -224,7 +224,7 @@ if (isset($args[0])) {
|
|||
|
||||
try {
|
||||
$platform->init(Service::TYPE_WORKER, [
|
||||
'workersNum' => strtolower($workerName) === 'databases'? 1 :swoole_cpu_num() * intval(App::getEnv('_APP_WORKER_PER_CORE', 6)),
|
||||
'workersNum' => strtolower($workerName) === 'databases' ? 1 : swoole_cpu_num() * intval(App::getEnv('_APP_WORKER_PER_CORE', 6)),
|
||||
'connection' => $pools->get('queue')->pop()->getResource(),
|
||||
'workerName' => strtolower($workerName) ?? null,
|
||||
]);
|
||||
|
|
|
@ -19,7 +19,6 @@ class Audit extends Event
|
|||
$this
|
||||
->setQueue(Event::AUDITS_QUEUE_NAME)
|
||||
->setClass(Event::BUILDS_CLASS_NAME);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -15,7 +15,6 @@ require_once __DIR__ . '/../../../app/init.php';
|
|||
|
||||
class EventTest extends TestCase
|
||||
{
|
||||
|
||||
protected ?Event $object = null;
|
||||
protected string $queue = '';
|
||||
|
||||
|
|
Loading…
Reference in a new issue