From 156e1407ed702135a7580a3789d3fef992e35957 Mon Sep 17 00:00:00 2001 From: emmatveev Date: Wed, 27 Nov 2024 19:11:14 +0300 Subject: [PATCH 1/2] fix --- .deploy/deploy-prod.yaml | 51 +++------------------------------------- 1 file changed, 3 insertions(+), 48 deletions(-) diff --git a/.deploy/deploy-prod.yaml b/.deploy/deploy-prod.yaml index f229270..c83ad38 100644 --- a/.deploy/deploy-prod.yaml +++ b/.deploy/deploy-prod.yaml @@ -3,29 +3,12 @@ version: "3.4" services: - poll: - image: mathwave/sprint-repo:ruz-bot - environment: - STAGE: "production" - TELEGRAM_TOKEN: $TELEGRAM_TOKEN_PROD - networks: - - queues - command: poll - deploy: - mode: replicated - restart_policy: - condition: any - update_config: - parallelism: 1 - order: start-first - worker: image: mathwave/sprint-repo:ruz-bot environment: MONGO_HOST: "mongo.sprinthub.ru" STAGE: "production" MONGO_PASSWORD: $MONGO_PASSWORD_PROD - PLATFORM_SECURITY_TOKEN: $PLATFORM_SECURITY_TOKEN networks: - queues - configurator @@ -38,41 +21,21 @@ services: parallelism: 1 order: start-first - mailbox: - image: mathwave/sprint-repo:ruz-bot - environment: - STAGE: "production" - TELEGRAM_TOKEN: $TELEGRAM_TOKEN_PROD - networks: - - queues - command: mailbox - deploy: - mode: replicated - restart_policy: - condition: any - update_config: - parallelism: 1 - order: start-first - fetch: image: mathwave/sprint-repo:ruz-bot environment: MONGO_HOST: "mongo.sprinthub.ru" STAGE: "production" MONGO_PASSWORD: $MONGO_PASSWORD_PROD - PLATFORM_SECURITY_TOKEN: $PLATFORM_SECURITY_TOKEN DEBUG: "false" networks: - queues + - configurator command: fetch deploy: mode: replicated restart_policy: condition: any - placement: - constraints: - - node.role == worker - - node.labels.zone == ru update_config: parallelism: 1 order: start-first @@ -83,19 +46,15 @@ services: MONGO_HOST: "mongo.sprinthub.ru" STAGE: "production" MONGO_PASSWORD: $MONGO_PASSWORD_PROD - PLATFORM_SECURITY_TOKEN: $PLATFORM_SECURITY_TOKEN DEBUG: "false" networks: - queues + - configurator command: notify deploy: mode: replicated restart_policy: condition: any - placement: - constraints: - - node.role == worker - - node.labels.zone == ru update_config: parallelism: 1 order: start-first @@ -104,21 +63,17 @@ services: image: mathwave/sprint-repo:ruz-bot networks: - common-infra-nginx + - configurator environment: MONGO_HOST: "mongo.sprinthub.ru" STAGE: "production" MONGO_PASSWORD: $MONGO_PASSWORD_PROD - PLATFORM_SECURITY_TOKEN: $PLATFORM_SECURITY_TOKEN DEBUG: "false" command: api deploy: mode: replicated restart_policy: condition: any - placement: - constraints: - - node.role == worker - - node.labels.zone == ru update_config: parallelism: 1 order: start-first -- 2.45.2 From f4af02ec1d0fd35ca4fee9c02192e2818930bfad Mon Sep 17 00:00:00 2001 From: Egor Matveev Date: Sun, 15 Jun 2025 14:56:49 +0300 Subject: [PATCH 2/2] fix --- helpers/answer.py | 2 +- helpers/ruz.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/helpers/answer.py b/helpers/answer.py index 7c711d2..e9893f3 100644 --- a/helpers/answer.py +++ b/helpers/answer.py @@ -77,7 +77,7 @@ class Answer: body = {'text': text, 'chat_id': self.user['chat_id'], 'parse_mode': 'Markdown'} if reply_markup: body['reply_markup'] = reply_markup.to_json() - queues.set_task('botalka_mailbox', {'project': 'ruz-bot', 'name': 'telegram-bot', 'body': body}, 1) + queues.set_task('botalka_mailbox', {'project': 'ruz-bot', 'name': 'telegram-bot', 'body': body}, 5) def set_state(self, state: str): self.user['state'] = state diff --git a/helpers/ruz.py b/helpers/ruz.py index 27f6447..91922a6 100644 --- a/helpers/ruz.py +++ b/helpers/ruz.py @@ -12,7 +12,8 @@ fields = [ 'date_start', 'date_end', 'lecturer_profiles', - 'stream_links' + 'stream_links', + 'type', ] -- 2.45.2