Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed tasks and Chain #254

Closed
nvictor opened this issue Sep 7, 2017 · 2 comments
Closed

Failed tasks and Chain #254

nvictor opened this issue Sep 7, 2017 · 2 comments

Comments

@nvictor
Copy link

nvictor commented Sep 7, 2017

I must be doing something wrong. When a task within a chain fails, the next one is still queued. Not the behavior I was expecting since tasks depend on successful previous tasks in my situation.

I am wondering if that's how it's supposed to be, since no one else seems to have this issue?

I have this configuration

Q_CLUSTER = {
    'name': 'cluster-1',
    'label': 'DjangoQ Tasks',
    'timeout': 2*60*60,
    'retry': 2.5*60*60,
    'orm': 'default'
}

The tasks are created and run using

ch = Chain()
...
ch.append(full_python_path(context, task), context=context, ...)
...
ch.run()
@nvictor
Copy link
Author

nvictor commented Sep 8, 2017

I may have answered my own question. I am going to close this issue and do some more testing on my side.

For anyone reading: seems the sync option (I saw it in the docs but I was left to believe it was just for testing) and a container for my chains would work.

The current structure I am testing is

# class ChainList(list):
#     def run(self):
#        for ch in self:
#            ch.run()
chl = ChainList()
...
ch = Chain(sync=True)
...
ch.append(...)
...
chl.append(ch)
...
# finally
chl.run()

@nvictor nvictor closed this as completed Sep 8, 2017
@nvictor
Copy link
Author

nvictor commented Sep 8, 2017

Nope. Still queueing tasks one after a failed one even with sync=True...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant