mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix format and test
This commit is contained in:
@@ -61,7 +61,7 @@ class StatsResources extends Action
|
||||
Console::loop(function () use ($queue) {
|
||||
Authorization::disable();
|
||||
Authorization::setDefaultStatus(false);
|
||||
|
||||
|
||||
$last24Hours = (new \DateTime())->sub(\DateInterval::createFromDateString('24 hours'));
|
||||
/**
|
||||
* For each project that were accessed in last 24 hours
|
||||
|
||||
@@ -11,12 +11,11 @@ use Utopia\Platform\Action;
|
||||
use Utopia\Queue\Message;
|
||||
use Utopia\System\System;
|
||||
|
||||
|
||||
class StatsUsageDump extends Action
|
||||
{
|
||||
const METRIC_COLLECTION_LEVEL_STORAGE = 4;
|
||||
const METRIC_DATABASE_LEVEL_STORAGE = 3;
|
||||
const METRIC_PROJECT_LEVEL_STORAGE = 2;
|
||||
public const METRIC_COLLECTION_LEVEL_STORAGE = 4;
|
||||
public const METRIC_DATABASE_LEVEL_STORAGE = 3;
|
||||
public const METRIC_PROJECT_LEVEL_STORAGE = 2;
|
||||
protected array $stats = [];
|
||||
|
||||
/**
|
||||
|
||||
@@ -499,7 +499,7 @@ class HealthCustomServerTest extends Scope
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
*/
|
||||
$response = $this->client->call(Client::METHOD_GET, '/health/queue/usage', array_merge([
|
||||
$response = $this->client->call(Client::METHOD_GET, '/health/queue/stats-usage', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), []);
|
||||
@@ -511,7 +511,7 @@ class HealthCustomServerTest extends Scope
|
||||
/**
|
||||
* Test for FAILURE
|
||||
*/
|
||||
$response = $this->client->call(Client::METHOD_GET, '/health/queue/usage?threshold=0', array_merge([
|
||||
$response = $this->client->call(Client::METHOD_GET, '/health/queue/stats-usage?threshold=0', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), []);
|
||||
|
||||
Reference in New Issue
Block a user