Overhaul Classical PSHA hazard curve handling
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenQuake (deprecated) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Calculator: Classical Hazard
The current method of calculating and storing hazard curves (in the DB and NRML) is overly complicated. Here is the current process:
1) For each @task, compute hazard curves (Java) and return them as JSON.
2) Store the hazard curves (as JSON) in Redis (on the Python side).
3) Throughout the calculation, periodically pull hazard curve JSON data from Redis and write the data to the database (and NRML, if requested). This gathering and serialization is done by an asynchronous task handler.
This process could be simplified:
1) For each @task, compute hazard curves (Java).
2) Immediately store the hazard curves in the database (still within the context of the task).
3) Remove the serialization duties from the async task handler.
4) If --output-type=xml is requested, export NRML artifacts from the DB in the post_execute() method of the calculator.
The scope of this bug should be limited to simplifying the DB serialization and adding the post_execute() hook for generating NRML. Bug # 961984 should be addressed first (exporting curves from the DB to NRML).
tags: | added: database hazard techdebt |
description: | updated |
description: | updated |
This calculator has been re-written, based on the oq-hazardlib. This is not an issue anymore.