Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write the output of a simulation in the database #67

Closed
nils-prommersberger opened this issue Jul 20, 2024 · 3 comments · Fixed by #103
Closed

Write the output of a simulation in the database #67

nils-prommersberger opened this issue Jul 20, 2024 · 3 comments · Fixed by #103

Comments

@nils-prommersberger
Copy link
Collaborator

To get the output check the state of a request inside the submitter and get the output if it is READY. If it returns ERROR, call the get_output function to clean the process up and start it again.
The get_output function returns the csv data as a string.

@nils-prommersberger
Copy link
Collaborator Author

Der Output einer Simulation kann im submitter als csv abgerufen werden. Dies muss noch in die Datenstruktur Djangos übersetzt und in die Datenbank geschrieben werden. Am besten in einer View, immer wenn eine Seite geöffnet wird (/view, /simulations)

@juliushaag
Copy link
Collaborator

Added a middleware, which can be used to check the current status, it is called every time ANY webpage is requested from django

@nils-prommersberger
Copy link
Collaborator Author

Die middleware wird momentan nicht genutzt. Dem thread der Submittierung wird eine Funktion übergeben, welche die Daten in die Datenbank schreibt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants