diff --git a/shared/workspaces/alembic/versions/templates/restore_cms/fetch_sh_2.8.3.txt b/shared/workspaces/alembic/versions/templates/restore_cms/fetch_sh_2.8.3.txt index eee5743da6ceaf025338a3d6d8d6b783af5a4567..0951ddf8b3d616e0c187c99dc20c05973ec940bc 100644 --- a/shared/workspaces/alembic/versions/templates/restore_cms/fetch_sh_2.8.3.txt +++ b/shared/workspaces/alembic/versions/templates/restore_cms/fetch_sh_2.8.3.txt @@ -12,8 +12,8 @@ $SBIN_PATH/framework.sh -d . chmod 770 . if [ ! -z "$PREV_PROCESSING_DIR" ] && [ -d "../$PREV_PROCESSING_DIR/rawdata/" ] && [ ! -z "$(ls -A ../$PREV_PROCESSING_DIR/rawdata/)" ]; then - # Reuse the raw data from the previous version - mv ../$PREV_PROCESSING_DIR/rawdata/ . + # Reuse the raw data from the previous version with hard links + cp -lR ../$PREV_PROCESSING_DIR/rawdata/ . else # Run the product fetcher cd rawdata/ diff --git a/shared/workspaces/alembic/versions/templates/std_calibration/fetch_sh_2.8.3.txt b/shared/workspaces/alembic/versions/templates/std_calibration/fetch_sh_2.8.3.txt index eee5743da6ceaf025338a3d6d8d6b783af5a4567..0951ddf8b3d616e0c187c99dc20c05973ec940bc 100644 --- a/shared/workspaces/alembic/versions/templates/std_calibration/fetch_sh_2.8.3.txt +++ b/shared/workspaces/alembic/versions/templates/std_calibration/fetch_sh_2.8.3.txt @@ -12,8 +12,8 @@ $SBIN_PATH/framework.sh -d . chmod 770 . if [ ! -z "$PREV_PROCESSING_DIR" ] && [ -d "../$PREV_PROCESSING_DIR/rawdata/" ] && [ ! -z "$(ls -A ../$PREV_PROCESSING_DIR/rawdata/)" ]; then - # Reuse the raw data from the previous version - mv ../$PREV_PROCESSING_DIR/rawdata/ . + # Reuse the raw data from the previous version with hard links + cp -lR ../$PREV_PROCESSING_DIR/rawdata/ . else # Run the product fetcher cd rawdata/ diff --git a/shared/workspaces/alembic/versions/templates/std_restore_imaging/fetch_sh_2.8.3.txt b/shared/workspaces/alembic/versions/templates/std_restore_imaging/fetch_sh_2.8.3.txt index eee5743da6ceaf025338a3d6d8d6b783af5a4567..0951ddf8b3d616e0c187c99dc20c05973ec940bc 100644 --- a/shared/workspaces/alembic/versions/templates/std_restore_imaging/fetch_sh_2.8.3.txt +++ b/shared/workspaces/alembic/versions/templates/std_restore_imaging/fetch_sh_2.8.3.txt @@ -12,8 +12,8 @@ $SBIN_PATH/framework.sh -d . chmod 770 . if [ ! -z "$PREV_PROCESSING_DIR" ] && [ -d "../$PREV_PROCESSING_DIR/rawdata/" ] && [ ! -z "$(ls -A ../$PREV_PROCESSING_DIR/rawdata/)" ]; then - # Reuse the raw data from the previous version - mv ../$PREV_PROCESSING_DIR/rawdata/ . + # Reuse the raw data from the previous version with hard links + cp -lR ../$PREV_PROCESSING_DIR/rawdata/ . else # Run the product fetcher cd rawdata/ diff --git a/shared/workspaces/workspaces/capability/services/capability_info.py b/shared/workspaces/workspaces/capability/services/capability_info.py index 05a9f541972a507a0c4bc4fccef783210a4da490..b25d1077b5cd8cd3c52171e89805f19e2cfe4923 100644 --- a/shared/workspaces/workspaces/capability/services/capability_info.py +++ b/shared/workspaces/workspaces/capability/services/capability_info.py @@ -785,7 +785,10 @@ class RestrictedInfo(CapabilityInfo): current_version_files = request.current_version.files # Store the previous execution's spool directory for reusing bits of it - if request.current_version.workflow_metadata: + # Note: This is currently limited to capabilities that update the fetch stage + if (request.current_version.workflow_metadata + and "processing_dir" in request.current_version.workflow_metadata + and "fetch_end_time" in request.current_version.workflow_metadata): parameters["prev_processing_dir"] = request.current_version.workflow_metadata["processing_dir"] version = CapabilityVersion(