inasafe / inasafe-fba

Next generation of InaSAFE that includes support for forecast based action
MIT License
1 stars 8 forks source link

Discuss why trigger evaluation is blocking #3

Closed lucernae closed 4 years ago

lucernae commented 4 years ago

Discuss what is the best way control program flow for the forecast fetch + trigger evaluation

lucernae commented 4 years ago

Summary of current implementation is written here: https://github.com/inasafe/inasafe-fba/tree/master/documents/backend-development

Trigger evaluation is blocked because forecast fetch waits for materialized view refresh. So, if we implement forecast fetch as db triggers, it will not work since it will wait for the current trigger sessions to finish. Forecast script needs to commit the changes, then evaluate the trigger.