From time to time, it is necessary to pull out the job ID and run ID from a CivisFuture object (e.g., for debugging). Based on internal user experience from both co-workers and myself, it wasn't immediately clear how the IDs can be retrieved, until one realizes that (as of civis v1.9.4) CivisFuture subclasses PollableResult, which in turn subclasses CivisAsyncResultBase that has the poller_args attribute which is a tuple of (job_id, run_id). It would be nice to expose the IDs at CivisFuture and do so without the language of "polling" or similar.
In terms of implementation, it looks like ContainerFuture, which subclasses CivisFuture, already has the property attributes job_id and run_id. This PR moves the relevant code from ContainerFuture to CivisFuture; class inheritance preserves the job_id and run_id behavior at ContainerFuture. (The only other class that inherits from CivisFuture is SubscribableResult, which is just CivisFuture and has been marked to be deprecated.)
From time to time, it is necessary to pull out the job ID and run ID from a
CivisFuture
object (e.g., for debugging). Based on internal user experience from both co-workers and myself, it wasn't immediately clear how the IDs can be retrieved, until one realizes that (as of civis v1.9.4)CivisFuture
subclassesPollableResult
, which in turn subclassesCivisAsyncResultBase
that has thepoller_args
attribute which is a tuple of (job_id, run_id). It would be nice to expose the IDs atCivisFuture
and do so without the language of "polling" or similar.In terms of implementation, it looks like
ContainerFuture
, which subclassesCivisFuture
, already has the property attributesjob_id
andrun_id
. This PR moves the relevant code fromContainerFuture
toCivisFuture
; class inheritance preserves thejob_id
andrun_id
behavior atContainerFuture
. (The only other class that inherits fromCivisFuture
isSubscribableResult
, which is justCivisFuture
and has been marked to be deprecated.)