ScenarioWaiterExternalLab
Attributes
scenario_id: strFunctions
__init__
Waiter to check a scenario of an external lab
external_lab_service :
ExternalLabApiService external lab API service instance
scenario_id :
str scenario id
message_dispatcher :
gws_core.core.classes.observer.message_dispatcher.MessageDispatcher | None message dispatcher to send messages
get_scenario_dto
Return type :
ScenarioWaitInfoDTO get_scenario_import_info
Return type :
ExternalLabImportScenarioResponseDTO wait_for_scenario_to_start
Wait until the scenario is running. This should be called when the scenario is in the queue or running async. If the scenario reaches an excluded status (draft or already finished), it will raise an exception (unless raise_on_excluded is False).
refresh_interval :
int - 30 interval in seconds between each refresh
refresh_interval_max_count :
int - 10 maximum number of refresh, if reached, it will raise an exception
set -1 to wait indefinitely
raise_on_excluded :
bool - True if True, raise an exception when an excluded status is reached.
If False, return the scenario instead
Return type :
ScenarioWaitInfoDTO wait_until_finished
Wait until the scenario is finished. If the scenario is in draft mode, it will raise an exception (unless raise_on_excluded is False).
refresh_interval :
int - 30 interval in seconds between each refresh
refresh_interval_max_count :
int - 10 maximum number of refresh, if reached, it will raise an exception
set -1 to wait indefinitely
raise_on_excluded :
bool - True if True, raise an exception when an excluded status is reached.
If False, return the scenario instead
Return type :
ScenarioWaitInfoDTO wait_until_status
Wait until the scenario reaches one of the target statuses. If the scenario reaches an excluded status, it will either raise an exception or return the scenario depending on raise_on_excluded.
target_statuses :
list list of statuses to wait for
excluded_statuses :
list[gws_core.scenario.scenario_enums.ScenarioStatus] | None list of statuses that should stop the wait if reached
raise_on_excluded :
bool - True if True, raise an exception when an excluded status is reached.
If False, return the scenario instead
refresh_interval :
int - 30 interval in seconds between each refresh
refresh_interval_max_count :
int - 10 maximum number of refresh, if reached, it will raise an exception
set -1 to wait indefinitely
Return type :
ScenarioWaitInfoDTO