-
Notifications
You must be signed in to change notification settings - Fork 2.4k
added a new event 'progress' #2498
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
Conversation
This event can be fired by the task itself while running. The purpose is for the task to report progress, metadata or any generic info so that event handler listening for this can keep track of the progress of running task.
LGTM |
One urging side thought - there is some existing code already, catering for similar communication:
I guess anyway the use of events would be preferable, could allow us to eventually replace the ad-hoc code? |
Are those for communication from worker to scheduler? If that is the case, it doesn't seem to fit very well to our use case. |
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 know we're not the best at it, but can we start adding docs to all new Event entries?
Just copy what you said in this PR description and make sure it renders decently with pydocs (we have docs testing instructions)
@Tarrasch 👍 for that, will fix. |
@@ -25,6 +25,10 @@ class Event(object): | |||
DEPENDENCY_PRESENT = "event.core.dependency.present" | |||
BROKEN_TASK = "event.core.task.broken" | |||
START = "event.core.start" | |||
#: This event can be fired by the task itself while running. The purpose is |
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.
Tried following existing inline doc. How does it look? @Tarrasch
I didn't mean to include communication with the scheduler in our solution. It was just an aside comment, that we'll now be "reporting progress" in 2 different ways, and that I prefer event approach among those. |
OK. Got it. |
* upstream-master: Fix S3Client.copy return value consistency (spotify#2488) s3client check for deprecated host keyword and raise error with the details (spotify#2493) Fix exception when toml lib is not installed (spotify#2506) Add Okko to companies that use luigi (spotify#2512) Added optional choice for hdfs clients (spotify#2487) Version 2.7.8 revert tornado upgrade Version 2.7.7 added a new event 'progress' (spotify#2498) Add Uppsala University / pharmb.io as user (spotify#2496)
@ulzha PTAL
Description
Added a new event named
event.core.progress
.Motivation and Context
This event can be fired by the task itself while running. The purpose is
for the task to report progress, metadata or any generic info so that
event handler listening for this can keep track of the progress of
running task.
Have you tested this? If so, how?
I have included unit tests.