bcgov / NRPTI

Natural Resources Public Transparency Initiative
Apache License 2.0
5 stars 15 forks source link

NRPTI API crashing during daily cronjob #1250

Closed acatchpole closed 2 weeks ago

acatchpole commented 2 weeks ago

Describe the Bug When the daily cronjob (import and, more importantly, act names update) runs, the API is crashing. This is only occurring in Test because Prod does not have the act names update as part of its cronjob yet.

Expected Behaviour The cronjob runs smoothly and does not crash and restart.

Actual Behaviour When the cronjob tries to run the update act names task, it crashes with an error indicating a call to a this.parseTitleFromXML is a function that doesn't exist.

Implications Some of the other cronjob behaviour is not occurring properly because of the API crashing and having to restart.

Steps To Reproduce

  1. When the /acts-regulations/update endpoint is called
  2. NPM will crash throwing an error this.parseTitleFromXML is not a function
  3. The pod will automatically restart
  4. The cronjob will continue to make calls to run the other tasks that will return errors as the pod isn't in a ready state