Scenario status within a python webapp
I have a webapp that changes variables when the user selects them. However i want it to send an error message when the user attempts to change the variables while a scenario is running. I want to write python code to check whether a scenario is running or not.
I am not using an API as it is within a webapp in the project so the usual:
scenario = project.get_scenario('scenario_name')
# Check if the scenario is running
if scenario.running:
print('SCENARIO ALREADY RUNNING')
else:
print('NO SCENARIO RUNNING')
... is not working. How can I get the status of a scenario without the api client?
Answers
-
Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,226 Dataiker
Hi @akember18
,
You can use :
https://developer.dataiku.com/latest/api-reference/python/client.html#dataikuapi.DSSClient.list_running_scenarios
But requires admin.
Thanks