IBMStreams / streamsx.utility

(Incubation) Contains utilities for IBM Streams
Other
1 stars 15 forks source link

Python: Add the ability to refresh any REST object to get the latest state. #38

Closed ddebrunner closed 7 years ago

ddebrunner commented 7 years ago

E.g. refresh a job to get its latest health.

Code should be generic.

ibmkendrick commented 7 years ago

I'm working on this one.

Adding a refresh method on _ResourceElement, so all classes inherit from it (i.e. Jobs, Instance) will be able to refresh its own status.

ibmkendrick commented 7 years ago

When the REST call to refresh status returns successfully, the shape of the JSON response should be identical (i.e. contains identical set of keys).

When the REST call returns an error, the JSON attributes stored within _ResourceElement object should be reflected accordingly. (for example, if a job has been cancelled, then the job.health should indicate so)

Different objects may have different ways to represent error state, and will need to be processed accordingly.

ddebrunner commented 7 years ago

Replaced by:

https://github.com/IBMStreams/streamsx.topology/issues/862