Skip to content

Commit ca9ee53

Browse files
committed
CCDB time machine: only upload objects if running in a GRID job as aliprod
1 parent 5aeb0b5 commit ca9ee53

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎MC/run/ANCHOR/anchorMC.sh‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,13 @@ if [[ -n ${ALIEN_JDL_CCDB_CONDITION_NOT_AFTER} ]]; then
358358
# override CCDB time machine timestamp by hand, use e.g. 3385078236000 to effectively disable it
359359
ARG_CONDITION_NOT_AFTER="--condition-not-after ${ALIEN_JDL_CCDB_CONDITION_NOT_AFTER}"
360360
else
361-
# options to set CCDB url, disable upload and force overwrite of an existing timestamp; default to production CCDB, uploading the object and not overwriting
361+
# options to set CCDB url and force overwrite of an existing timestamp; default to production CCDB and not overwriting
362362
: ${CCDBTIMEMACHINE_CCDB_URL:=https://alice-ccdb.cern.ch}
363-
[[ ${CCDBTIMEMACHINE_SKIP_UPLOAD:-} != "1" ]] && CCDBTIMEMACHINE_OPTIONS+=" --publish-to-ccdb"
364363
[[ ${CCDBTIMEMACHINE_FORCE_OVERWRITE:-} == "1" ]] && CCDBTIMEMACHINE_OPTIONS+=" --force-overwrite"
365364

365+
# only upload new objects if running a GRID job as aliprod
366+
[[ ${JALIEN_USER:-} == "aliprod" ]] && [[ ${CCDBTIMEMACHINE_SKIP_UPLOAD:-} != "1" ]] && CCDBTIMEMACHINE_OPTIONS+=" --publish-to-ccdb"
367+
366368
# obtain CCDB time machine timestamp from CCDB or, if not available, estimate it from the creation time of the reconstruction output files
367369
CCDBTIMEMACHINE_CMD="${O2DPG_ROOT}/GRID/utils/getCCDBTimeMachineTimestamp.py --ccdb-url $CCDBTIMEMACHINE_CCDB_URL ${CCDBTIMEMACHINE_OPTIONS:-}"
368370
echo "Running command to obtain CCDB time machine timestamp: ${CCDBTIMEMACHINE_CMD}"

0 commit comments

Comments
 (0)