mirror of
				https://github.com/elyby/accounts.git
				synced 2025-05-31 14:11:46 +05:30 
			
		
		
		
	Сбор метрик о работе воркера
This commit is contained in:
		| @@ -32,11 +32,14 @@ class AccountQueueController extends AmqpController { | ||||
|     } | ||||
|  | ||||
|     public function routeUsernameChanged(UsernameChanged $body): bool { | ||||
|         Yii::$app->statsd->inc('worker.account.usernameChanged.attempt'); | ||||
|         $mojangApi = $this->createMojangApi(); | ||||
|         try { | ||||
|             $response = $mojangApi->usernameToUUID($body->newUsername); | ||||
|             Yii::$app->statsd->inc('worker.account.usernameChanged.found'); | ||||
|         } catch (NoContentException $e) { | ||||
|             $response = false; | ||||
|             Yii::$app->statsd->inc('worker.account.usernameChanged.not_found'); | ||||
|         } catch (RequestException $e) { | ||||
|             return true; | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user