gem / openquake-server

DEPRECATED. Please refer to https://github.com/gem/oq-engine
6 stars 1 forks source link

Refactoring of the "input_upload" API endpoint implementation #6

Closed al-maisan closed 13 years ago

al-maisan commented 13 years ago

Hello there!

First of all I apologise for the length of this branch (850 lines).

This refactors the "input_upload" API endpoint as follows:

- the loading of NRML files is doing asynchronously and outside of the
  initial "input_upload" POST request which makes the overall system more
  resilient
- NRML processor crashes are now detected (see is_process_running())
- the OpenQuake data is now residing in its own database ("openquake")
- we have a layer of indirection (utils.dbn()) allowing us to switch to a
  different database (e.g. for test runs) without touching the code (all it
  takes is the setting of the OQ_MTAPI_DB environment variable
- the code is lacking test coverage but it has been tested on gemsun02 and
  works in deployment there.

Any questions? Just ask :-)

larsbutler commented 13 years ago

Aside from my comments about documentation, LGTM.

The /home/* paths in the settings file can wait, pending our discussion about where we should put everything.

al-maisan commented 13 years ago

On 05/12/2011 05:08 PM, larsbutler wrote:

Aside from my comments about documentation, LGTM.

The /home/* paths in the settings file can wait, pending our discussion about where we should put everything.

Thanks for the review Lars!

I have added the documentation as you requested. I also added a first db unit test. The diff is here: http://paste.ubuntu.com/606828/

Best regards/Mit freundlichen Grüßen

Muharem Hrnjadovic muharem@openquake.org

larsbutler commented 13 years ago

LGTM