Error when regenerating the warehouse

Issue #1143 resolved
Ghislain Hachey created an issue

Comments (5)

  1. Brian Lewis repo owner

    I think this is something you will see only in development environment: and I think it relates to the grunt script ‘deploy’ which may not release the file after it has copied it.

    That said, this error occurs rewriting the ‘vermdata.xml’ file held in assets_local. These days, we don’t source that indicator file from that static file: instead, it is stored on to table ‘warehouse.indicators’ when it is created, and it is read from there.

    see warehouse.VermPAF stored proc.

    So I think the highlighted code here:

    can all go.

    we don't need to be concerned with maintaining or distributing vermdata.xml files in assets_local; which is a simplification.

  2. Ghislain Hachey reporter

    Ok, lowering priority and yes would be nice to clean up what is not needed but not urgent.

    For what it’s worth, Newton did see this at least once in production. But I have ran the regenerate since and did not see it.

  3. Brian Lewis repo owner

    There are a lot of vermdata files in assets_local that could be deleted - but before we do we should check if some of the non-current ones (palemis? etc) are stored somewhere else…

  4. Brian Lewis repo owner

    issue1143 branch removes the highlighted code above and refactors a little to ensure indicators are up-to-date. Specifically, there is a check in the REST endpoint api/indicators that the indicators requested have been calculated from the latest warehouse data, if not they are calculated on the spot then returned to the client.

    In practice the admin/warehouse page rebuild the warehouse and then builds the indicators, so they should not get out of sync. This change will protect if the warehouse is rebuilt directly from sql.

  5. Log in to comment