get_result

fireopal.get_result(action_id)

Retrieve the result of a previously submitted Fire Opal action.

Use this function to fetch the outcome of an action that was submitted asynchronously via any Fire Opal function that returns a FireOpalJob instance (for example, fireopal.execute()). If the action is still in progress, this function blocks until the action completes and the result becomes available.

Parameters

action_id (int or str) – The unique numeric identifier associated with the action. You can find this value from the Fire Opal activity monitor (fireopal.activity_monitor()), or from the FireOpalJob.action_id of any Fire Opal function that returns a FireOpalJob instance.

Returns

dict[str, Any] – The action result dictionary. The structure of this dictionary matches the result that would have been returned by calling the result() method on the fireopal.FireOpalJob instance returned from the function that created the action. Refer to the Returns section of the appropriate function’s documentation for the exact structure of this dictionary.

Raises

QctrlArgumentsValueError – If action_id is not a valid numeric value.

Examples

Retrieve the result of a previously submitted action using its ID:

>>> result = fireopal.get_result(action_id=12345)
>>> print(result["results"]) # assuming fireopal.execute produced this action
[{'00': 512, '11': 488}]

Was this useful?