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

Fix celery issues when using flower REST API #3950

Merged
merged 2 commits into from Apr 13, 2017
Merged

Conversation

tramora
Copy link

@tramora tramora commented Mar 31, 2017

Description

We meet issues when using the "official" flower REST API and "broker" in front of celery.
c.f github.com/mher/flower/issues/648
I've created a Quick & Dirty patch for this.
Could you please review ?
Thanks

jonastl added a commit to tomologic/docker-flower that referenced this pull request Apr 7, 2017
Flower throws a stack trace and returns HTTP 500 when the /tasks
endpoint is being triggered. A defect that manifested after Celery went
from v3 to v4.

The following change is incorporated
celery/celery#3950

To address the following issue:
mher/flower#648
jonastl added a commit to tomologic/docker-flower that referenced this pull request Apr 7, 2017
Flower throws a stack trace and returns HTTP 500 when the /tasks
endpoint is being triggered. A defect that manifested after Celery went
from v3 to v4.

The following change is incorporated
celery/celery#3950

To address the following issue:
mher/flower#648
Copy link
Member

@thedrow thedrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are failing and there's one thing I need you to change. Please fix the build and the code.

@@ -296,7 +296,7 @@ def __init__(self, uuid=None, cluster_state=None, children=None, **kwargs):
self.children = WeakSet(
self.cluster_state.tasks.get(task_id)
for task_id in children or ()
if task_id in self.cluster_state.tasks
if self.cluster_state is not None and task_id in self.cluster_state.tasks
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like it's a better idea to extract the additional condition outside of the comprehension.

@tramora
Copy link
Author

tramora commented Apr 10, 2017

Thanx for your feedback @thedrow.
I've corrected and the tests pass for 3.5 and 3.6.

@thedrow thedrow merged commit 949a70d into celery:master Apr 13, 2017
@thedrow
Copy link
Member

thedrow commented Apr 13, 2017

Thanks. Feel free to add yourself to the AUTHORS file.

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

Successfully merging this pull request may close these issues.

None yet

2 participants