From c623e67a6d11cd38d66b33fcaa4a8122e4e20ce8 Mon Sep 17 00:00:00 2001 From: the-superpirate Date: Mon, 12 Apr 2021 23:46:46 +0300 Subject: [PATCH] - feat(idm): Move related channel to configs 2 internal commit(s) GitOrigin-RevId: 5ca92c5edb4fd4e19f6322307168581146dd9618 --- idm/api/configs/base.yaml | 1 + idm/api/daemons/admin_log_reader.py | 3 +-- rules/python/requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/idm/api/configs/base.yaml b/idm/api/configs/base.yaml index efb918d..fc64164 100644 --- a/idm/api/configs/base.yaml +++ b/idm/api/configs/base.yaml @@ -15,3 +15,4 @@ telegram: app_id: 00000 database: session_id: '/usr/lib/idm-api/{{ ENV_TYPE }}/session.db' + related_channel: '@nexus_search' diff --git a/idm/api/daemons/admin_log_reader.py b/idm/api/daemons/admin_log_reader.py index 74dddaf..53bd51e 100644 --- a/idm/api/daemons/admin_log_reader.py +++ b/idm/api/daemons/admin_log_reader.py @@ -9,8 +9,6 @@ from telethon.tl.types import ChannelParticipantsSearch class AdminLogReader(AioThing): - channel_name = '@nexus_search' - def __init__(self, telegram_config): super().__init__() self.subscriptors = set() @@ -21,6 +19,7 @@ class AdminLogReader(AioThing): database=telegram_config['database'], flood_sleep_threshold=25, ) + self.channel_name = telegram_config['related_channel'] self.last_max_id = 0 def statbox(self, **kwargs): diff --git a/rules/python/requirements.txt b/rules/python/requirements.txt index 16b3133..28752de 100644 --- a/rules/python/requirements.txt +++ b/rules/python/requirements.txt @@ -62,7 +62,7 @@ idna==2.10 isort==5.8.0 itsdangerous==1.1.0 izihawa_types==0.1.0 -izihawa_utils==0.3.0 +izihawa_utils==0.3.1 Jinja2==2.11.3 jupyter==1.0.0 kazoo==2.8.0