Closed Ginzou-3 closed 2 months ago
Hi @Ginzou-3, why are you stopping the Core service and loading two different configurations?
Try to create only one configuration/TOML and load it once in your if __name__ == "__main__"
. Same thing for the run method. It should only be run once in your if __name__ == "__main__"
and never stopped.
If not possible, please tell us what is your use case so we can understand it a bit better.
Hm okay i thought the config is like a changeable disk, like when i want to listen to another band, i change the CD. For me a toml file was like a workflow. When I have a different workflow a change my toml. Thats why i stop my core, because i cant alter the config file when its running.
Idea: Get request for workflow 1 -> taipy loads the config -> let the scenario run -> return the output -> request for workflow 2 -> core stop -> load new config -> etc
The configuration is how you configure your application overall. Inside a unique application/configuration, you can have different workflows/scenarios.
@jrobinAV If you have anything to say, please do.
Not much to add...
The Config has been created to support multiple workflows (They are called ScenarioConfig
).
If you want to create multiple workflows, you can create multiple ScenarioConfig
in the global Config singleton. Then, you can instantiate as many scenarios as you want from any ScenarioConfig
you created. You can run them, visualize the results, etc. of the various scenarios in the same application.
I am closing this issue as it is not a bug. However, if you have any remarks @Ginzou-3, you can create another issue to improve Taipy documentation or usability!
What went wrong? 🤔
Hello, im trying to use taipy core to build a service. My goal is to give my service a toml, the scenario name and some data and receive an output from the workflow. Tested alone all the scenarios work fine, but when i try to excecute two different scenarios the core crashes (yes the same scenario can be executed multiple times).
Im using core 3.3.1 on Windows 10.
Expected Behavior
The first scenario works fine:
The second scenario loads the toml succesfull:
I can provide the toml file if needed
Steps to Reproduce Issue
Solution Proposed
No response
Screenshots
Runtime Environment
Visual Studio Code
Browsers
No response
OS
Windows
Version of Taipy
3.1.1
Additional Context
No response
Acceptance Criteria
Code of Conduct