mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Linter fix
This commit is contained in:
+3
-3
@@ -775,17 +775,17 @@ $http->on('start', function ($http) {
|
||||
// Get usage stats of host machine CPU usage from 0 to 100.
|
||||
$healthServer->handle('/v1/health', function (SwooleRequest $swooleRequest, SwooleResponse $swooleResponse) use ($orchestrationPool) {
|
||||
$orchestration = null;
|
||||
|
||||
|
||||
try {
|
||||
$secretKey = $swooleRequest->header['x-appwrite-executor-key'] ?? '';
|
||||
if (empty($secretKey)) {
|
||||
throw new Exception('Missing executor key', 401);
|
||||
}
|
||||
|
||||
|
||||
if ($secretKey !== App::getEnv('_APP_EXECUTOR_SECRET', '')) {
|
||||
throw new Exception('Missing executor key', 401);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$output = [
|
||||
'status' => 'pass'
|
||||
|
||||
@@ -10,7 +10,7 @@ class RoundRobin extends Adapter
|
||||
{
|
||||
private Atomic $counter;
|
||||
|
||||
function __construct(RedisPool $redisPool)
|
||||
public function __construct(RedisPool $redisPool)
|
||||
{
|
||||
parent::__construct($redisPool);
|
||||
$this->counter = new Atomic(-1);
|
||||
@@ -22,7 +22,7 @@ class RoundRobin extends Adapter
|
||||
$executors = $this->getExecutors();
|
||||
$executor = $executors[$index] ?? null;
|
||||
|
||||
if(!$executor) {
|
||||
if (!$executor) {
|
||||
$executor = $executors[0];
|
||||
$this->counter->cmpset($index, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user