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

Mantis Integration #1

Open
nickrsan opened this issue Mar 5, 2019 · 0 comments
Open

Mantis Integration #1

nickrsan opened this issue Mar 5, 2019 · 0 comments

Comments

@nickrsan
Copy link
Member

nickrsan commented Mar 5, 2019

We'll integrate with the Mantis server using an extensible class that has methods to send commands and get commands. Initially, this is very simple - write a file, wait for lock file to appear, then disappear, then read results back into database. In the future, we'll use a slightly different version of the same class (but hopefully dropin) that is more robust to send straight to server. It should also keep its own queue. We might consider doing this with celery, but not sure how to make celery wait for the right conditions, so maybe we just store the run in the DB with its params, and then note that it's waiting - some process is constantly checking for if Mantis can take new commands and pulls the run that's been waiting the longest and writes it out. We won't do that for the prototype, but will for the final.

We'll need separate code to send results to web - right now, that should probably just be a simplified result - one percentile. In the future, we'll want people to be able to specify that. Let's just start with getting results into the DB with values (model_run_id, year, value) - then we can just select all model_run_id, group by year, and run statistics to get values. Could probably do all of it in the DB, but not sure about using Django to get arbitrary percentiles.

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

No branches or pull requests

1 participant