Skip to content

Add a get_run_state function at application level #363

@optislangdeveloper

Description

@optislangdeveloper

📝 Description of the feature

If you use

osl.application.project.start(wait_for_finished=False)

you want to have a way of checking if the run finished.

My current approach of polling
while True: status = osl.project.root_system.get_status() if status == "Processing done": print(f'status: {status}') break elif status == "Check failed": print(f'status: {status}') break

does work, but it comes to timing issues when I activate/deactivate certain nodes and call again

osl.application.project.start(wait_for_finished=False)

The issue I noticed is, that the second start call does nothing - my assumption, the first start is not yet at end even though the status is already Processing done.

💡 Steps for implementing the feature

I want to call a function that returns the run state of the application / system based on the same notification system that is used when I call

osl.application.project.start(wait_for_finished=True)

🔗 Useful links and references

proxy_solver_amop_opt_on_amop_validation.txt

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions