Skip to content

Mantis Integration #1

@nickrsan

Description

@nickrsan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions