Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9110037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T03:10:57+00:00 2026-06-17T03:10:57+00:00

I’m using Celery 3.0.12. I have two queues: Q1, Q2. In general I put

  • 0

I’m using Celery 3.0.12.

I have two queues: Q1, Q2.

In general I put the main task in Q1, which call then subtasks that go in Q2.
I don’t want to store any results for the subtasks. So my subtasks have the decorator @celery.task(ignore_results=True).

My main task should now wait until the subtask has finished. Because I write no results. I can’t use: AsyncResult. Is there a way to wait in the main task to wait until the subtask finishes without storing the states to the backend. All my attempts with AsyncResults are not successfuel, (it relies on the backend). It seems also get() relies on the backend.

The whole story in code:

@celery.task(ignore_result=True)
def subtask():
   #Do something

@celery.task
def maintask():
    # Do something

    # Call subtask on Q2:
    res = subtask(options={'queue':'Q2'}).delay()

    # Need to wait till subtask finishes
    # NOT WORKING (DOES NEVER RETURN)
    res.get()

I’m monitoring the whole application with Celery Flower and I can see that subtask is successfuelly finishing. How can Celery detect that state? I browsed their code but couldn’t find out how they do the detection.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T03:10:58+00:00Added an answer on June 17, 2026 at 3:10 am

    My main task should now wait until the subtask has finished.

    You should never wait for a subtask as this may lead to resource starvation and deadlock (all
    tasks waiting for another task, but no more workers to process them).

    Instead you should use a callback to do additional actions after the subtask completes
    (see the Canvas guide in the Celery user guide).

    I’m monitoring the whole application with Celery Flower and I can see that subtask is
    successfuelly finishing. How can Celery detect that state? I browsed their code but couldn’t
    find out how they do the detection.

    Flower and other monitors does not use results (task state), instead they use what we call events.

    Event messages are emitted when certain actions occur in the worker, and this becomes a transient stream of messages. Processes can subscribe to certain events (or all of them) to monitor the cluster.

    The events are separate from task states because,

    • Events are not persistent (transient)

      Missing an event is not regarded as a critical failure.

    • Complex fields are not serialized

      Events are for diagnostic and informational purposes, and should not be used
      to introspect task return values or exceptions
      for example, as only the repr() of these is stored to make sure monitors
      can be written in other languages, and big fields may be truncated to ensure
      faster transmission.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a small JavaScript validation script that validates inputs based on Regex. I
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have an autohotkey script which looks up a word in a bilingual dictionary
I have an array which has BIG numbers and small numbers in it. I
I have a text area in my form which accepts all possible characters from
I have thousands of HTML files to process using Groovy/Java and I need to
I am trying to loop through a bunch of documents I have to put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.