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 8784883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:12:52+00:00 2026-06-13T21:12:52+00:00

I am currently using Redis for a workflow with a couple of steps in

  • 0

I am currently using Redis for a workflow with a couple of steps in it. For each step, a worker snatches the payload from a queue, and when its done, pushes it onto the next queue, where the next worker can take it further. If an exception occurs, the task is put into a special queue by the worker.

The application logic with regards to the flow through the application hence lies in the workers themselves. I now want to switch to Celery.

I understand that in Celery you can use subtasks, but I fail to see how you express your specific error handling there for different conditions such as exceptions and time-outs. Are you supposed to use different queues or use subtasks, and what would that look like in code?

  • 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-13T21:12:53+00:00Added an answer on June 13, 2026 at 9:12 pm

    I have now read the docs even more thoroughly and additionally made some tests, and this works:

    The problem is to string together tasks so that they happen one after the other, but at the same time be able to handle error conditions and “break out” of the flow and do something else, not just abort.

    You can string together tasks with link, and if an extra parameter *link_error* is in there it will be used for failure. From reading:

    http://docs.celeryproject.org/en/latest/userguide/calling.html#linking-callbacks-errbacks
    I made this:

    res = add.apply_async((2, 2), link=mul.s(16), link_error=onerror.s())
    

    The three tasks are add, mul and onerror. Add adds two numbers and mul multiplies two numbers. So this will add 2 and 2 together, and then the sum will carried over to the next step (mul) and be multiplied by 16.
    However, if the add code is buggy, or has bad data or if something else bad but detectable occurs, add throws an exception and the onerror task will be run instead of mul. The onerror task gets the uuid of the job and can look the job up in the database backend, if such a one is configured. The onerror task can then archive the job or send an e-mail or whatever.

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

Sidebar

Related Questions

Currently I am running puppet from root user. I want to manage Redis using
I'm currently using Socket.IO with redis store. And I'm using Room feature with it.
Currently I'm using https://github.com/mranney/node_redis as my node redis client. client.retry_delay is set to 250ms
I'm currently running multiple redis instances on one box. Each have their own config,
I am new for redis and currently I am using PHP resque for redis.
I have a system set up currently that is using celery with a redis
I'm working on a real-time website using Nodejs . Currently, I'm using Redis because
I'm currently building a real-time betting engine using redis / thin / sinatra. A
I have gone though the tutorial of redis and php. i am currently using
I am currently using two redis nodes where one is replicating another. Other than

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.