René's URL Explorer Experiment


Title: [BUG] Bot hangs when using ctrl + c and MessageQueue · Issue #2012 · python-telegram-bot/python-telegram-bot · GitHub

Open Graph Title: [BUG] Bot hangs when using ctrl + c and MessageQueue · Issue #2012 · python-telegram-bot/python-telegram-bot

X Title: [BUG] Bot hangs when using ctrl + c and MessageQueue · Issue #2012 · python-telegram-bot/python-telegram-bot

Description: Steps to reproduce Set the working variable to False Run the bot using ./main.py Hit ctrl + c Expected behaviour The bot should stop. Actual behaviour The bot hangs. Configuration Operating System: 10.15.5 (19F101) Version of Python, pyt...

Open Graph Description: Steps to reproduce Set the working variable to False Run the bot using ./main.py Hit ctrl + c Expected behaviour The bot should stop. Actual behaviour The bot hangs. Configuration Operating System:...

X Description: Steps to reproduce Set the working variable to False Run the bot using ./main.py Hit ctrl + c Expected behaviour The bot should stop. Actual behaviour The bot hangs. Configuration Operating System:...

Opengraph URL: https://github.com/python-telegram-bot/python-telegram-bot/issues/2012

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] Bot hangs when using ctrl + c and MessageQueue","articleBody":"\u003c!--\r\nThanks for reporting issues of python-telegram-bot!\r\n\r\nUse this template to notify us if you found a bug.\r\n\r\nTo make it easier for us to help you please enter detailed information below.\r\n\r\nPlease note, we only support the latest version of python-telegram-bot and\r\nmaster branch. Please make sure to upgrade & recreate the issue on the latest\r\nversion prior to opening an issue.\r\n-->\r\n### Steps to reproduce\r\n\r\n1. Set the `working` variable to `False`\r\n2. Run the bot using `./main.py`\r\n3. Hit \u003ckbd>ctrl\u003c/kbd> + \u003ckbd>c\u003c/kbd>\r\n\r\n### Expected behaviour\r\n\r\nThe bot should stop.\r\n\r\n### Actual behaviour\r\n\r\nThe bot hangs.\r\n\r\n### Configuration\r\n\r\n**Operating System:** 10.15.5 (19F101)\r\n\r\n**Version of Python, python-telegram-bot & dependencies:**\r\n\r\n```\r\npython-telegram-bot 12.8\r\ncertifi 2020.06.20\r\nPython 3.7.7 (default, Mar 10 2020, 15:43:33)  [Clang 11.0.0 (clang-1100.0.33.17)]\r\n```\r\n\r\n### Logs\r\n\r\nWorking:\r\n\r\n```\r\n> ./main.py\r\n2020-07-02 12:59:25,880 - __main__ - INFO - Started polling\r\n2020-07-02 12:59:26,157 - __main__ - INFO - Bot started. Press Ctrl-C to stop.\r\n^C2020-07-02 12:59:27,504 - telegram.ext.updater - INFO - Received signal 2 (SIGINT), stopping...\r\n```\r\n\r\nthen exits.\r\n\r\nNot working:\r\n\r\n```\r\n> ./main.py\r\n2020-07-02 12:59:34,283 - telegram.ext.updater - WARNING - Connection pool of Request object is smaller than optimal value (8)\r\n2020-07-02 12:59:34,283 - __main__ - INFO - Started polling\r\n2020-07-02 12:59:34,537 - __main__ - INFO - Bot started. Press Ctrl-C to stop.\r\n^C2020-07-02 12:59:37,574 - telegram.ext.updater - INFO - Received signal 2 (SIGINT), stopping...\r\n```\r\n\r\nand hangs.\r\n\r\n`main.py`:\r\n\r\n```py\r\n#!/usr/bin/env python3\r\n# -*- coding: utf-8 -*-\r\n\r\nimport logging\r\n\r\nlogging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)\r\n\r\nfrom telegram.ext import Updater\r\n\r\nfrom queue_bot import QueueBot\r\n\r\nlogger = logging.getLogger(__name__)\r\nupdater = None\r\n\r\n\r\ndef main():\r\n    logger.info('Started polling')\r\n\r\n    updater.start_polling(timeout=0.01)\r\n\r\n    logger.info('Bot started. Press Ctrl-C to stop.')\r\n\r\n    updater.idle()\r\n\r\n\r\nif __name__ == '__main__':\r\n    token = 'TOKEN'\r\n    working = True\r\n\r\n    if working:\r\n        updater = Updater(token, use_context=True)\r\n    else:\r\n        queue_bot = QueueBot(token)\r\n        updater = Updater(bot=queue_bot, use_context=True)\r\n\r\n    main()\r\n```\r\n\r\n`queue_bot.py`:\r\n\r\n```py\r\n#!/usr/bin/env python3\r\n# -*- coding: utf-8 -*-\r\n\r\nfrom telegram.bot import Bot\r\nfrom telegram.ext import messagequeue\r\n\r\n\r\nclass QueueBot(Bot):\r\n    def __init__(self, *args, **kwargs):\r\n        super(QueueBot, self).__init__(*args, **kwargs)\r\n\r\n        self._is_messages_queued_default = True\r\n        self._msg_queue = messagequeue.MessageQueue()\r\n\r\n    def __del__(self):\r\n        try:\r\n            self._msg_queue.stop()\r\n        except:\r\n            pass\r\n\r\n    @messagequeue.queuedmessage\r\n    def send_message(self, *args, **kwargs):\r\n        return super(QueueBot, self).send_message(*args, **kwargs)\r\n```","author":{"url":"https://github.com/revolter","@type":"Person","name":"revolter"},"datePublished":"2020-07-02T10:02:50Z","url":"https://github.com/python-telegram-bot/python-telegram-bot/issues/2012"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:60c1ce75-ab23-04aa-7710-57cc439ce4c9
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC646:1F95:73F51B:96C048:6B025CEB
html-safe-nonce1d4c8c20b1456a12437136bcf6e6276120f736121c5e976719fb1b8b60f9b94e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNjQ2OjFGOTU6NzNGNTFCOjk2QzA0ODo2QjAyNUNFQiIsInZpc2l0b3JfaWQiOiI1ODI1NjIzNTg2ODc4MTUxOTE1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac301d955036b61ec25b108eee1416515d86ab86148ec482abfe40c041240195dc
hovercard-subject-tagissue:649804244
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-telegram-bot/python-telegram-bot/2012/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ee867b3847a49e1d398c129ca8fbda6c0db1a53823a2fdda56dd15ccaf745d27/python-telegram-bot/python-telegram-bot/issues/2012
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ee867b3847a49e1d398c129ca8fbda6c0db1a53823a2fdda56dd15ccaf745d27/python-telegram-bot/python-telegram-bot/issues/2012
og:image:altSteps to reproduce Set the working variable to False Run the bot using ./main.py Hit ctrl + c Expected behaviour The bot should stop. Actual behaviour The bot hangs. Configuration Operating System:...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerevolter
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/python-telegram-bot/python-telegram-bot git https://github.com/python-telegram-bot/python-telegram-bot.git
octolytics-dimension-user_id16178365
octolytics-dimension-user_loginpython-telegram-bot
octolytics-dimension-repository_id38696925
octolytics-dimension-repository_nwopython-telegram-bot/python-telegram-bot
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id38696925
octolytics-dimension-repository_network_root_nwopython-telegram-bot/python-telegram-bot
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python-telegram-bot/python-telegram-bot/issues/2012#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-telegram-bot%2Fpython-telegram-bot%2Fissues%2F2012
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-telegram-bot%2Fpython-telegram-bot%2Fissues%2F2012
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python-telegram-bot%2Fpython-telegram-bot
Reloadhttps://github.com/python-telegram-bot/python-telegram-bot/issues/2012
Reloadhttps://github.com/python-telegram-bot/python-telegram-bot/issues/2012
Reloadhttps://github.com/python-telegram-bot/python-telegram-bot/issues/2012
python-telegram-bothttps://github.com/python-telegram-bot
python-telegram-bothttps://github.com/python-telegram-bot/python-telegram-bot
Codehttps://github.com/python-telegram-bot/python-telegram-bot
Issues23 (23)https://github.com/python-telegram-bot/python-telegram-bot/issues
Pull requests19 (19)https://github.com/python-telegram-bot/python-telegram-bot/pulls
Discussionshttps://github.com/python-telegram-bot/python-telegram-bot/discussions
Actionshttps://github.com/python-telegram-bot/python-telegram-bot/actions
Projectshttps://github.com/python-telegram-bot/python-telegram-bot/projects
Wikihttps://github.com/python-telegram-bot/python-telegram-bot/wiki
Security and qualityhttps://github.com/python-telegram-bot/python-telegram-bot/security
Insightshttps://github.com/python-telegram-bot/python-telegram-bot/insights
https://github.com/python-telegram-bot/python-telegram-bot
New issuehttps://github.com/login?return_to=https://github.com/python-telegram-bot/python-telegram-bot/issues/2012
New issuehttps://github.com/login?return_to=https://github.com/python-telegram-bot/python-telegram-bot/issues/2012
🐛 bughttps://github.com/python-telegram-bot/python-telegram-bot/issues?q=type:"🐛 bug"
[BUG] Bot hangs when using ctrl + c and MessageQueuehttps://github.com/python-telegram-bot/python-telegram-bot/issues/2012#top
https://github.com/revolter
revolterhttps://github.com/revolter
on Jul 2, 2020https://github.com/python-telegram-bot/python-telegram-bot/issues/2012#issue-649804244
revolterhttps://github.com/revolter
bug 🐛https://github.com/python-telegram-bot/python-telegram-bot/issues?q=state%3Aopen%20label%3A%22bug%20%3Abug%3A%22
on Jul 2, 2020https://github.com/python-telegram-bot/python-telegram-bot/issues/2012#event-3506354271
https://github.com/Bibo-Joshi
Bibo-Joshihttps://github.com/Bibo-Joshi
on Jul 2, 2020https://github.com/python-telegram-bot/python-telegram-bot/issues/2012#issuecomment-652914823
https://github.com/revolter
revolterhttps://github.com/revolter
on Jul 2, 2020https://github.com/python-telegram-bot/python-telegram-bot/issues/2012#issuecomment-652915169
https://github.com/revolter
revolterhttps://github.com/revolter
on Jul 2, 2020https://github.com/python-telegram-bot/python-telegram-bot/issues/2012#issuecomment-653108644
https://github.com/Bibo-Joshi
Bibo-Joshihttps://github.com/Bibo-Joshi
on Jul 2, 2020https://github.com/python-telegram-bot/python-telegram-bot/issues/2012#issuecomment-653143877
https://github.com/revolter
revolterhttps://github.com/revolter
on Jul 2, 2020https://github.com/python-telegram-bot/python-telegram-bot/issues/2012#issuecomment-653191289
https://github.com/revolter
revolterhttps://github.com/revolter
on Jul 5, 2020https://github.com/python-telegram-bot/python-telegram-bot/issues/2012#issuecomment-653878486
https://github.com/Bibo-Joshi
Bibo-Joshihttps://github.com/Bibo-Joshi
on Jul 6, 2020https://github.com/python-telegram-bot/python-telegram-bot/issues/2012#issuecomment-654456705
https://github.com/revolter
revolterhttps://github.com/revolter
on Jul 7, 2020https://github.com/python-telegram-bot/python-telegram-bot/issues/2012#issuecomment-655052184
https://github.com/Bibo-Joshi
Bibo-Joshihttps://github.com/Bibo-Joshi
on Jan 9, 2021https://github.com/python-telegram-bot/python-telegram-bot/issues/2012#issuecomment-757374598
#2139https://github.com/python-telegram-bot/python-telegram-bot/issues/2139
#2139https://github.com/python-telegram-bot/python-telegram-bot/issues/2139
Bibo-Joshihttps://github.com/Bibo-Joshi
completedhttps://github.com/python-telegram-bot/python-telegram-bot/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jan 9, 2021https://github.com/python-telegram-bot/python-telegram-bot/issues/2012#event-4187474777
github-actionshttps://github.com/apps/github-actions
on Jan 11, 2021https://github.com/python-telegram-bot/python-telegram-bot/issues/2012#event-4188936599
Bibo-Joshihttps://github.com/Bibo-Joshi
bug 🐛https://github.com/python-telegram-bot/python-telegram-bot/issues?q=state%3Aopen%20label%3A%22bug%20%3Abug%3A%22
on Nov 4, 2024https://github.com/python-telegram-bot/python-telegram-bot/issues/2012#event-15107545552
Sign up for freehttps://github.com/signup?return_to=https://github.com/python-telegram-bot/python-telegram-bot/issues/2012
Sign in to commenthttps://github.com/login?return_to=https://github.com/python-telegram-bot/python-telegram-bot/issues/2012
🐛 bughttps://github.com/python-telegram-bot/python-telegram-bot/issues?q=type:"🐛 bug"
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.