-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Adding basic events to celery Batches #82
base: main
Are you sure you want to change the base?
Conversation
* Add events task-received, task-succeded and task-started * Format to follow black formating
I think this is based on #34? |
@@ -150,6 +150,7 @@ def test_signals(celery_app: Celery, celery_worker: TestWorkController) -> None: | |||
# Other task signals are not implemented. | |||
(signals.task_retry, 0), | |||
(signals.task_success, 1), | |||
(signals.task_received, 3), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll also want to assert the other signals.
It might make sense to keep the PRs small and implement them one at a time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can split the PR into more small ones (one for received, and one for success).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say that if you know task_received
works already, let's get that one done and then move onto the others?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add the missing asserts for task_succeeded
and/or task_started
.
for request in requests: | ||
request.send_event("task-started") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous PR (#34) sets the req.start_time
for each first. Any idea if this is necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe, for what we are trying to implement now, this time_start
is not necessary for now. It will surely come handy later if we implement all events for monitoring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, we can probably start w/o it. I'll need to double check the celery code around here so we stay similar-ish.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine :) I'll wait for the push then and continue working on other events such as failed/revoked/retry (where failed and retry would be the most important for application monitoring)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll wait for the push then and continue working on other events
Sorry -- I'm unsure what you mean by this. Are you waiting on me for something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll wait for the push then and continue working on other events
Sorry -- I'm unsure what you mean by this. Are you waiting on me for something?
No do not worry, that would be an other topic/PR (related to our latest messages in the issue 83)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK! Do you see this ready for review then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do !
Following preceding works (not updated since), I do this PR to add the following modifications
I intend (with your help if possible) to implement at least
task-failed
andtask-retried
events as well.