-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The Run table needs to be populated and maintained in an automated fashion.
The NPES Schedule database can be examined to determine the bounds of runs, but it is complex so runs are now determined in advance and cached in the btm_owner.run table. Ideally this cache of runs is kept up-to-date in an automated way when schedules are modified. Also, the initial population of runs from the existing database would be useful. Currently, just the most recent two runs are in the run table, and they were manually inserted, and new runs can be missed if not manually added.
Historically the run determination was automated and calculated on the fly each time the /rest/runs endpoint was requested. This was costly to calculate, plus assumed all months had data (explicit OFF) for SAD times. If SAD times were not explicit the automated routine found zero results.