mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Implemented WebHooks delivery queue.
Completely removed usage of the RabbitMQ. Queue now based on Redis channels. Worker process now extracted as separate docker container. Base image upgraded to the 1.8.0 version (PHP 7.2.7 and pcntl extension).
This commit is contained in:
@ -19,7 +19,7 @@ class SessionModel {
|
||||
|
||||
public static function find(string $username, string $serverId): ?self {
|
||||
$key = static::buildKey($username, $serverId);
|
||||
$result = Yii::$app->redis->executeCommand('GET', [$key]);
|
||||
$result = Yii::$app->redis->get($key);
|
||||
if (!$result) {
|
||||
return null;
|
||||
}
|
||||
@ -36,11 +36,11 @@ class SessionModel {
|
||||
'serverId' => $this->serverId,
|
||||
]);
|
||||
|
||||
return Yii::$app->redis->executeCommand('SETEX', [$key, self::KEY_TIME, $data]);
|
||||
return Yii::$app->redis->setex($key, self::KEY_TIME, $data);
|
||||
}
|
||||
|
||||
public function delete() {
|
||||
return Yii::$app->redis->executeCommand('DEL', [static::buildKey($this->username, $this->serverId)]);
|
||||
return Yii::$app->redis->del(static::buildKey($this->username, $this->serverId));
|
||||
}
|
||||
|
||||
public function getAccount(): ?Account {
|
||||
|
Reference in New Issue
Block a user