Skip to content
This repository has been archived by the owner on Feb 21, 2025. It is now read-only.

Commit

Permalink
Skip runs lower than MINIMUM_CMS_RUN_NUMBER
Browse files Browse the repository at this point in the history
  • Loading branch information
nothingface0 committed Jun 10, 2024
1 parent e141f2b commit ec71233
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions runregistry_backend/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ commonVars = {
idle: 20000,
acquire: 2000000,
},
// Ignore run numbers lower than this one
MINIMUM_CMS_RUN_NUMBER: 100000,
// DQMGUI
WAITING_DQM_GUI_CONSTANT: 'waiting dqm gui',
DQM_GUI_URL: 'https://cmsweb.cern.ch/dqm/offline/data/json/samples?match=',
Expand Down
7 changes: 6 additions & 1 deletion runregistry_backend/cron/1.get_runs.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,12 @@ const calculate_runs_to_update = (fetched_runs, last_saved_runs) => {
fetched_runs.forEach((fetched_run) => {
// If the run_number is less than the minimum of the already saved runs, then it is one from the past, which needs to be updated. Else we compare timestamps
if (fetched_run.run_number < min_run_number) {
runs_to_update.push(fetched_run);
if (fetched_run.run_number > MINIMUM_CMS_RUN_NUMBER) {
runs_to_update.push(fetched_run);

} else {
console.log(`Run number ${fetched_run.run_number} is lower than the threshold MINIMUM_CMS_RUN_NUMBER (${MINIMUM_CMS_RUN_NUMBER}), ignoring`)
}
} else {
// If the run_number is inside the existing already saved runs, then we check for the timestamp:
last_saved_runs.forEach((existing_run) => {
Expand Down

0 comments on commit ec71233

Please sign in to comment.