Ability to retrieve submission information given a CallFuture
object
#485
Labels
type: enhancement
New feature or request
CallFuture
object
#485
Given a
CallFuture
object, it would be useful to be able to retrieve submission information (e.g. theargs
andkwargs
that were submitted for the givenCallFuture
). These could be used for reporting results and errors to the user, and avoid writing boilerplate code for storing these states elsewhere.Workaround no. 1: in addition to storing each
CallFuture
, we store a mapping fromCallFuture
to customSubmissionInfo
objects. The latter contains details about the task submission.Workaround no. 2: we create a new attribute on each
CallFuture
instance usingHasTraits.add_trait()
. That attribute contains the submission info, which can be accessed when the task is finished. (The attribute cannot be set as usual.CallFuture
inherits from theHasStrictTraits
class, which prevents exactly that.)Half-workaround (assuming exceptions are not used): modify the submitted function to also return its input parameters. This doesn’t work if the input parameters are needed for reporting errors too.
The text was updated successfully, but these errors were encountered: