Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runs cache is not automated #3

Open
slominskir opened this issue Jul 13, 2023 · 3 comments
Open

Runs cache is not automated #3

slominskir opened this issue Jul 13, 2023 · 3 comments

Comments

@slominskir
Copy link
Member

The Run table needs to be populated and maintained in an automated fashion.

The PAC 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.

@slominskir
Copy link
Member Author

Worth noting that only the most recent two runs (current and previous) are actually used at the moment. Used by the date range selector in smoothness reports

@slominskir
Copy link
Member Author

Also worth noting we could just have a setup page allowing add/edit runs. This has the advantage of allowing ACTUAL run to not match SCHEDULED. This is what is happening at the moment where PAC version 2 says we start restore on Aug 28 but we actually started restore on Aug 26.

@slominskir
Copy link
Member Author

slominskir commented Jan 22, 2024

Also worth noting it appears HTTP cache headers caches JSON response for 24 hours.

https://ace.jlab.org/btm/rest/runs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant