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

Adding basic events to celery Batches #82

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Anghille
Copy link

@Anghille Anghille commented Oct 2, 2023

Following preceding works (not updated since), I do this PR to add the following modifications

  • Add signals.task_received to tests
  • Add events task-received, task-succeded and task-started
  • Format to follow black /flake8 formatting

I intend (with your help if possible) to implement at least task-failed and task-retried events as well.

* Add events task-received, task-succeded and task-started
* Format to follow black formating
@clokep
Copy link
Owner

clokep commented Oct 2, 2023

Following preceding works (not updated since)

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),
Copy link
Owner

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?

Copy link
Author

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).

Copy link
Owner

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?

Copy link
Owner

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.

Comment on lines +377 to +378
for request in requests:
request.send_event("task-started")
Copy link
Owner

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?

Copy link
Author

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.

Copy link
Owner

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.

Copy link
Author

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)

Copy link
Owner

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?

Copy link
Author

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)

Copy link
Owner

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?

Copy link
Author

Choose a reason for hiding this comment

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

I do !

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