From 05d6a16c2c86c7f4a264d51d683f6f0726c94752 Mon Sep 17 00:00:00 2001 From: Borja Lopez Date: Thu, 10 Mar 2022 22:59:59 +0100 Subject: [PATCH] feat: Add .dockerignore and time sleep --- .dockerignore | 5 +++++ .github/workflows/build.yml | 1 + src/commands.py | 2 ++ 3 files changed, 8 insertions(+) diff --git a/.dockerignore b/.dockerignore index 5a95e9b..81971ce 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,6 +7,11 @@ Dockerfile .pre-commit-config.yaml LICENSE Makefile +pytest.ini README.md +requirements.dev.txt setup.cfg +setup.py +tox.ini **/**/__pycache__/** +**/**/tests/ diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e55d6a2..7f9d960 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,6 +36,7 @@ jobs: push: true tags: | mairror/mairror-bot:${{ github.ref_name }} + mairror/mairror-bot:latest cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max diff --git a/src/commands.py b/src/commands.py index 288cd27..7951b63 100644 --- a/src/commands.py +++ b/src/commands.py @@ -1,4 +1,5 @@ import json +import time from typing import Dict import requests @@ -193,6 +194,7 @@ def photo(update: Update, context: CallbackContext) -> None: send_photo_to_api(files) context.bot.send_chat_action(chat_id=update.effective_chat.id, action="typing") + time.sleep(7) prediction_result = predict("raw/" + image) if prediction_result: