From 1753dbe8b0b287ad0990db94208c40ef743984c4 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 11 Aug 2022 06:18:37 +0000 Subject: [PATCH] fix formatting --- app/controllers/api/functions.php | 2 +- src/Appwrite/Usage/Stats.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 7e0e85f8a..044a63ad1 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -900,7 +900,7 @@ App::post('/v1/functions/:functionId/executions') ->label('scope', 'execution.write') ->label('event', 'functions.[functionId].executions.[executionId].create') ->label('usage.metric', 'executions.{scope}.compute') - ->label('usage.params', ['functionId'=>'request.functionId','executionStatus' => 'response.status', 'executionTime', 'response.time']) + ->label('usage.params', ['functionId' => 'request.functionId','executionStatus' => 'response.status', 'executionTime', 'response.time']) ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'functions') ->label('sdk.method', 'createExecution') diff --git a/src/Appwrite/Usage/Stats.php b/src/Appwrite/Usage/Stats.php index 7071142cf..f6a9b2915 100644 --- a/src/Appwrite/Usage/Stats.php +++ b/src/Appwrite/Usage/Stats.php @@ -188,7 +188,7 @@ class Stats if ($functionExecution >= 1) { $this->statsd->increment('executions.{scope}.compute' . $tags . ',functionId=' . $functionId . ',functionStatus=' . $functionExecutionStatus); - if($functionExecutionTime > 0) { + if ($functionExecutionTime > 0) { $this->statsd->count('executions.{scope}.compute.time' . $tags . ',functionId=' . $functionId, $functionExecutionTime); } }