JungDev / django-telegrambot

Simple app for Telegram bot in Django
BSD 3-Clause "New" or "Revised" License
237 stars 88 forks source link

Run async in webhook mode #34

Closed Nachtalb closed 3 years ago

Nachtalb commented 4 years ago

I found out that using @run_async in webhook mode lead into the nothingness of a queue that was not worked through. This is the webhook is not started via the updater.start_webhook as it's done usually with python-telegram-bot. So instead we call the underlying method ourselves.

As addition, I added a settings parameter to define on a per bot basis how many workers the bot shall use.

codecov-io commented 4 years ago

Codecov Report

Merging #34 into master will increase coverage by 0.09%. The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #34      +/-   ##
==========================================
+ Coverage   41.84%   41.94%   +0.09%     
==========================================
  Files           9        9              
  Lines         325      329       +4     
==========================================
+ Hits          136      138       +2     
- Misses        189      191       +2
Impacted Files Coverage Δ
django_telegrambot/apps.py 51.98% <50%> (-0.04%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 55aa268...3901b89. Read the comment docs.