Title: start_polling(), no clean way to exit? (etc) · Issue #209 · python-telegram-bot/python-telegram-bot · GitHub
Open Graph Title: start_polling(), no clean way to exit? (etc) · Issue #209 · python-telegram-bot/python-telegram-bot
X Title: start_polling(), no clean way to exit? (etc) · Issue #209 · python-telegram-bot/python-telegram-bot
Description: A few questions numbered for easy reference: If I am using virtualenv, and I'm activated in the environment, and if I run my code via python -m myteleapp (code nearly identical to https://github.com/python-telegram-bot/python-telegram-bo...
Open Graph Description: A few questions numbered for easy reference: If I am using virtualenv, and I'm activated in the environment, and if I run my code via python -m myteleapp (code nearly identical to https://github.co...
X Description: A few questions numbered for easy reference: If I am using virtualenv, and I'm activated in the environment, and if I run my code via python -m myteleapp (code nearly identical to https://githu...
Opengraph URL: https://github.com/python-telegram-bot/python-telegram-bot/issues/209
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"start_polling(), no clean way to exit? (etc)","articleBody":"A few questions numbered for easy reference:\n1. If I am using virtualenv, and I'm activated in the environment, and if I run my code via python -m myteleapp (code nearly identical to https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/echobot2.py ) ... which starts polling, I can't seem to exit out of polling with ctrl+c. Only way is to kill -9 my app and I don't think this is good for a shutdown. Is there any other way to break out of start_polling()? Perhaps I am doing something wrong. \n2. Or, is there a way to shutdown start_polling if I send the bot a specific message (which I would valid against a certain chat_id)? I tried sys.exit(0) in echo-like function from here https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/echobot2.py\n3. Does start_polling() poll every second? Or what's the delay? It looks like default is 0 from the code. Does that mean that it's immediate? This is partly why I went with webhooks, I thought it would be quicker, but this may be my misunderstanding.\n4. The reason I'm wanting to break out of start_polling() is because if I import another mod from my echo-like module, and if I update this other module that's included, I want to make sure start_polling() calls functions with the latest code. I believe I have to do this, I don't believe start_polling() would account for updates to code alone (since the process would stay active).\n\nThank you. \n","author":{"url":"https://github.com/zefoo","@type":"Person","name":"zefoo"},"datePublished":"2016-03-19T00:14:00Z","url":"https://github.com/python-telegram-bot/python-telegram-bot/issues/209"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:33bbf81f-f85f-daa8-e63d-40299bc59733 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BF4A:BBFFA:15F162:1CDB88:6B028F0F |
| html-safe-nonce | a03209d4d16589d1237b80546ddf590047325d274a60b5b0f3f4519eb43e45c8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjRBOkJCRkZBOjE1RjE2MjoxQ0RCODg6NkIwMjhGMEYiLCJ2aXNpdG9yX2lkIjoiNDgxNDg4NjIxODY5MTE1MzY3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 518659bc85d18baeee063b360f0c461933ffa4239ae7e30f4586d30f215e75d6 |
| hovercard-subject-tag | issue:142006265 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-telegram-bot/python-telegram-bot/209/issue_layout |
| twitter:image | https://opengraph.githubassets.com/884909c25cb14184c76d14eab175f72d3b27c61be114afaba2b262e740524b10/python-telegram-bot/python-telegram-bot/issues/209 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/884909c25cb14184c76d14eab175f72d3b27c61be114afaba2b262e740524b10/python-telegram-bot/python-telegram-bot/issues/209 |
| og:image:alt | A few questions numbered for easy reference: If I am using virtualenv, and I'm activated in the environment, and if I run my code via python -m myteleapp (code nearly identical to https://github.co... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | zefoo |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-telegram-bot/python-telegram-bot git https://github.com/python-telegram-bot/python-telegram-bot.git |
| octolytics-dimension-user_id | 16178365 |
| octolytics-dimension-user_login | python-telegram-bot |
| octolytics-dimension-repository_id | 38696925 |
| octolytics-dimension-repository_nwo | python-telegram-bot/python-telegram-bot |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 38696925 |
| octolytics-dimension-repository_network_root_nwo | python-telegram-bot/python-telegram-bot |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width