René's URL Explorer Experiment


Title: Can long-running tasks that haven't been completed be requeued after a graceful shutdown times out? · taskiq-python · Discussion #447 · GitHub

Open Graph Title: Can long-running tasks that haven't been completed be requeued after a graceful shutdown times out? · taskiq-python · Discussion #447

X Title: Can long-running tasks that haven't been completed be requeued after a graceful shutdown times out? · taskiq-python · Discussion #447

Description: Can long-running tasks that haven't been completed be requeued after a graceful shutdown times out?

Open Graph Description: I have a test task that takes more than 30 seconds to execute as follows: @broker.task() async def test(v: int): print(f"start {v}") await asyncio.sleep(35) print(f"end {v}") I started TaskIQ with ...

X Description: I have a test task that takes more than 30 seconds to execute as follows: @broker.task() async def test(v: int): print(f"start {v}") await asyncio.sleep(35) print(f"end {v}") I ...

Opengraph URL: https://github.com/orgs/taskiq-python/discussions/447

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"Can long-running tasks that haven't been completed be requeued after a graceful shutdown times out?","text":"

I have a test task that takes more than 30 seconds to execute as follows:

\n
@broker.task()\nasync def test(v: int):\n    print(f\"start {v}\")\n    await asyncio.sleep(35)\n    print(f\"end {v}\")\n
\n

I started TaskIQ with the following command: taskiq worker tasks.taskiq_init:broker -fsd --pattern=\"tasks/taskiq/tasks/*.py\" --shutdown-timeout=5 --wait-tasks-timeout=25.
\nWhen the test task began executing, I quickly used Ctrl+C and wait taskiq shutdown(the test task wasn't finished during the shutdown). Then I ran TaskIQ again. The test task did not re-execute. This behavior is different from sidekiq and Celery, which both requeue tasks that were not completed during shutdown.

\n

Is there an issue with the way I'm using TaskIQ(I use redis-broker)? Or does TaskIQ not have this feature? Is there any way to implement this functionality myself? This is a crucial feature for us because our project involves a large number of long-running tasks, each of which may take several minutes to execute.

\n

sincerely thanks!

","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

I found a problem with redis streams. Suddenly whem you fetch new messages from the stream, redis doesn't send unacknowledged messages along with new ones. Clients should fetch and claim them themselves.

\n

I've updated the way we handle unacknowledged messages and released new version of taskiq-redis. https://github.com/taskiq-python/taskiq-redis/releases/tag/1.0.6 Please try it out.

","upvoteCount":0,"url":"https://github.com/orgs/taskiq-python/discussions/447#discussioncomment-12874089"}}}

route-pattern/_view_fragments/Voltron::DiscussionsFragmentsController/show/orgs/:org/:discussion_number/discussion_layout(.:format)
route-controllervoltron_discussions_fragments
route-actiondiscussion_layout
fetch-noncev2:9007b75e-4e2a-79ec-e274-2621e8e1683e
current-catalog-service-hash9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be
request-id9F10:2946F1:1D23F26:25D8856:696D779D
html-safe-noncedb05ae2e11f7e67cdecdc837a6a19b39e1851ea6daabb56fdbdb5cb41e482180
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjEwOjI5NDZGMToxRDIzRjI2OjI1RDg4NTY6Njk2RDc3OUQiLCJ2aXNpdG9yX2lkIjoiMzI5MzczMTE0NDU2NDgzMjE1NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacdf9ec26836cd4a6eed753294f96af4c3ace97bd9133d15e93e8fa55d9068c489
hovercard-subject-tagdiscussion:8212037
github-keyboard-shortcutsrepository,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/discussions_fragments/discussion_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/orgs/taskiq-python/447/discussion_layout
twitter:imagehttps://opengraph.githubassets.com/a44175d013b94611615b82fc1064ff9596522f0c9a0333125ce77727cc16f857/orgs/taskiq-python/discussions/447
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a44175d013b94611615b82fc1064ff9596522f0c9a0333125ce77727cc16f857/orgs/taskiq-python/discussions/447
og:image:altI have a test task that takes more than 30 seconds to execute as follows: @broker.task() async def test(v: int): print(f"start {v}") await asyncio.sleep(35) print(f"end {v}") I started TaskIQ with ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4922b452d03cd8dbce479d866a11bc25b59ef6ee2da23aa9b0ddefa6bd4d0064
turbo-cache-controlno-preview
octolytics-dimension-user_id109470701
octolytics-dimension-user_logintaskiq-python
octolytics-dimension-repository_id514860374
octolytics-dimension-repository_nwotaskiq-python/taskiq
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id514860374
octolytics-dimension-repository_network_root_nwotaskiq-python/taskiq
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
release7e5ae23c70136152637ceee8d6faceb35596ec46
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Forgs%2Ftaskiq-python%2Fdiscussions%2F447
taskiq-pythonhttps://patch-diff.githubusercontent.com/taskiq-python
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Forgs%2Ftaskiq-python%2Fdiscussions%2F447
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fdiscussions_fragments%2Fdiscussion_layout&source=header-repo&source_repo=taskiq-python%2Ftaskiq
Reloadhttps://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
Reloadhttps://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
Reloadhttps://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
taskiq-python https://patch-diff.githubusercontent.com/taskiq-python
Overview https://patch-diff.githubusercontent.com/taskiq-python
Repositories https://patch-diff.githubusercontent.com/orgs/taskiq-python/repositories
Discussions https://patch-diff.githubusercontent.com/orgs/taskiq-python/discussions
Projects https://patch-diff.githubusercontent.com/orgs/taskiq-python/projects
Packages https://patch-diff.githubusercontent.com/orgs/taskiq-python/packages
People https://patch-diff.githubusercontent.com/orgs/taskiq-python/people
Overviewhttps://patch-diff.githubusercontent.com/taskiq-python
Repositorieshttps://patch-diff.githubusercontent.com/orgs/taskiq-python/repositories
Discussionshttps://patch-diff.githubusercontent.com/orgs/taskiq-python/discussions
Projectshttps://patch-diff.githubusercontent.com/orgs/taskiq-python/projects
Packageshttps://patch-diff.githubusercontent.com/orgs/taskiq-python/packages
Peoplehttps://patch-diff.githubusercontent.com/orgs/taskiq-python/people
Answered https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447#discussioncomment-12874089
s3riushttps://patch-diff.githubusercontent.com/s3rius
sujh https://patch-diff.githubusercontent.com/sujh
Q&Ahttps://patch-diff.githubusercontent.com/orgs/taskiq-python/discussions/categories/q-a
Can long-running tasks that haven't been completed be requeued after a graceful shutdown times out? https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447#top
sujh https://patch-diff.githubusercontent.com/sujh
Answered https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447#discussioncomment-12874089
s3riushttps://patch-diff.githubusercontent.com/s3rius
Return to tophttps://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447#top
Please reload this pagehttps://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
sujh https://patch-diff.githubusercontent.com/sujh
Apr 17, 2025 https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447#discussion-8212037
Give feedback.https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
s3rius https://patch-diff.githubusercontent.com/s3rius
Apr 18, 2025 https://github.com/orgs/taskiq-python/discussions/447#discussioncomment-12874089
https://github.com/taskiq-python/taskiq-redis/releases/tag/1.0.6https://github.com/taskiq-python/taskiq-redis/releases/tag/1.0.6
View full answer https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447#discussioncomment-12874089
Oldest https://patch-diff.githubusercontent.com/orgs/taskiq-python/discussions/447?sort=old
Newest https://patch-diff.githubusercontent.com/orgs/taskiq-python/discussions/447?sort=new
Top https://patch-diff.githubusercontent.com/orgs/taskiq-python/discussions/447?sort=top
Please reload this pagehttps://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
Please reload this pagehttps://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
s3rius https://patch-diff.githubusercontent.com/s3rius
Apr 17, 2025 https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447#discussioncomment-12863781
Give feedback.https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
https://patch-diff.githubusercontent.com/sujh
Please reload this pagehttps://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
Please reload this pagehttps://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
sujhhttps://patch-diff.githubusercontent.com/sujh
Apr 17, 2025 https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447#discussioncomment-12865526
@s3riushttps://github.com/s3rius
Give feedback.https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
https://patch-diff.githubusercontent.com/s3rius
Please reload this pagehttps://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
Please reload this pagehttps://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
s3riushttps://patch-diff.githubusercontent.com/s3rius
Apr 18, 2025 https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447#discussioncomment-12874089
https://github.com/taskiq-python/taskiq-redis/releases/tag/1.0.6https://github.com/taskiq-python/taskiq-redis/releases/tag/1.0.6
Give feedback.https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
sujhhttps://patch-diff.githubusercontent.com/sujh
https://patch-diff.githubusercontent.com/sujh
Please reload this pagehttps://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
sujhhttps://patch-diff.githubusercontent.com/sujh
Apr 18, 2025 https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447#discussioncomment-12875793
@s3riushttps://github.com/s3rius
Give feedback.https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
https://patch-diff.githubusercontent.com/sujh
Please reload this pagehttps://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
sujhhttps://patch-diff.githubusercontent.com/sujh
Apr 18, 2025 https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447#discussioncomment-12876328
@s3riushttps://github.com/s3rius
Give feedback.https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
https://patch-diff.githubusercontent.com/spikeninja
Please reload this pagehttps://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
spikeninjahttps://patch-diff.githubusercontent.com/spikeninja
Apr 18, 2025 https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447#discussioncomment-12877054
Give feedback.https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
https://patch-diff.githubusercontent.com/s3rius
Please reload this pagehttps://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
s3riushttps://patch-diff.githubusercontent.com/s3rius
Apr 18, 2025 https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447#discussioncomment-12877475
idle_timeouthttps://github.com/taskiq-python/taskiq-redis/blob/3312f1f3befd746bbc3839efea246e212119d866/taskiq_redis/redis_broker.py#L169
unacknowledged_batch_sizehttps://github.com/taskiq-python/taskiq-redis/blob/3312f1f3befd746bbc3839efea246e212119d866/taskiq_redis/redis_broker.py#L170
Give feedback.https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
Sign up for freehttps://patch-diff.githubusercontent.com/join?source=comment-repo
Sign in to commenthttps://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Forgs%2Ftaskiq-python%2Fdiscussions%2F447
🙏 Q&A https://patch-diff.githubusercontent.com/orgs/taskiq-python/discussions/categories/q-a
https://patch-diff.githubusercontent.com/sujh
https://patch-diff.githubusercontent.com/s3rius
https://patch-diff.githubusercontent.com/spikeninja
https://patch-diff.githubusercontent.com/taskiq-python/taskiq/discussions/447
https://patch-diff.githubusercontent.com/settings/replies?return_to=1
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.