Skip to content

Commit

Permalink
Merge pull request #3 from mairror/fix/add_sleep
Browse files Browse the repository at this point in the history
feat: Add .dockerignore and time sleep
  • Loading branch information
blopezpi authored Mar 10, 2022
2 parents 3f4b164 + 05d6a16 commit 4497e35
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions src/commands.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
import time
from typing import Dict

import requests
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 4497e35

Please sign in to comment.