Linter fix

This commit is contained in:
Matej Bačo
2022-10-19 11:23:03 +00:00
parent 7c7af6e4e9
commit 3e5dc86b4f
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -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'
+2 -2
View File
@@ -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);
}