-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
bugSomething isn't workingSomething isn't working
Description
First, it seems like a property may be more appropriate here and, the inclusion of "job" in the method name may be superfluous. It is unlikely that significant ambiguity would be introduced if the name was simply setStatusCallback or even 'setCallback`.
However, there are two other, more functional issues:
JobExecutor.get_instancemay return a singleton instance. A callback set on that instance previously would be overwritten by any new call tosetJobStatusCallback. And, because the callback is a "write-only" property, there is no way to check whether a callback is already set.- This is somewhat related to (1), but chaining callbacks, which is one way of supporting multiple callbacks, requires knowing what the previous callback in the chain is, which is, again, made difficult by the "write-only" aspect of this property.
Suggested Clarification
We should either make setJobStatusCallback into a read/write property (jobStatusCallback) or allow for multiple callbacks directly, e.g., by changing to addJobStatusCallback / removeJobStatusCallback since it's a tried and tested method in both Java and Python.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working