From 0c6538d458dc8faeacefcf048cedc66e5f93afe5 Mon Sep 17 00:00:00 2001 From: Leonardo Cristella Date: Thu, 13 Aug 2026 15:30:26 +0200 Subject: [PATCH] Add sync_days step to nightly cron before ingest --- dj_pipeline/cron_script.sh | 1 + dj_pipeline/docker/cron_common.sh | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/dj_pipeline/cron_script.sh b/dj_pipeline/cron_script.sh index 71da8a91..2ef4f21e 100755 --- a/dj_pipeline/cron_script.sh +++ b/dj_pipeline/cron_script.sh @@ -10,4 +10,5 @@ vr4mice_cron_init vr4mice_git_info vr4mice_compose_up db client +vr4mice_run_sync_days vr4mice_run_cron_scenario local diff --git a/dj_pipeline/docker/cron_common.sh b/dj_pipeline/docker/cron_common.sh index 1e714d49..1cc78f2a 100755 --- a/dj_pipeline/docker/cron_common.sh +++ b/dj_pipeline/docker/cron_common.sh @@ -67,3 +67,12 @@ vr4mice_run_cron_scenario() { fi vr4mice_exec_client "${cmd}" } + +vr4mice_run_sync_days() { + # Resync the per-experiment `day` stored in the raw .npy files before ingest, so + # (mouse_name, day, attempt) does not collide across dates (the GUI can reset day + # to 1). Runs in the client container against /data/data, and must run BEFORE + # populate_rig moves the files to processed/. + vr4mice_check_env_file ".env" ".env.example" + vr4mice_exec_client "${BASE_INSTALL} && set -a && source .env && set +a && python run.py sync_days" +}