Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning "Asynchronous callbacks can not be processed without at least one worker thread" when runngin commands #18

Open
autoantwort opened this issue Jul 23, 2021 · 1 comment

Comments

@autoantwort
Copy link

We are getting the warning

/venv/lib/python3.7/site-packages/telegram/ext/dispatcher.py:251: UserWarning: Asynchronous callbacks can not be processed without at least one worker thread.
 'Asynchronous callbacks can not be processed without at least one worker thread.'

every time a cron jobs executes a command in production. So we currently getting 1440 cron job mails a day :D

Is there a way to disable this or why we get this error in general, locally I don't get this error?

Can we prevent that all the telegrambot_handlers.py gets loaded when a command gets executed?

Thanks in advance :)

@autoantwort
Copy link
Author

As a workaround we now run python manage.py botpolling --username=MainBot & at the server, but that is not very nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant