Scenario status within a python webapp

Options
akember18
akember18 Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1 Partner

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

Setup Info
    Tags
      Help me…