Skip to content
Snippets Groups Projects
Commit 4b38a3a4 authored by schmittu's avatar schmittu :beer:
Browse files

fix update-operational: don't copy raw data files per default

parent 2e8d6aa6
Branches hdf5_1_12_0
No related tags found
No related merge requests found
Pipeline #10168 failed
......@@ -15,7 +15,7 @@ from poolkit.landing_zone import (
write_lock,
)
from poolkit.utils import is_server_running
from poolkit.yaml import sort_for_update_operational
from poolkit.yaml import RawDataFile, find_entity, sort_for_update_operational
from .check import _check, _check_rename
......@@ -182,7 +182,11 @@ def _update_operational(
try:
num_files += _update(
operational_landing_zone, development_landing_zone, print_ok, delay
operational_landing_zone,
development_landing_zone,
print_ok,
delay,
copy_raw,
)
except DataPoolException as e:
print_err("- update failed:")
......@@ -198,9 +202,15 @@ def _update_operational(
return 0
def _update(operational_landing_zone, development_landing_zone, print_ok, delay):
def _update(
operational_landing_zone, development_landing_zone, print_ok, delay, copy_raw
):
to_update = list_new_or_changed_files(development_landing_zone)
for rel_path in sort_for_update_operational(development_landing_zone, to_update):
entity = find_entity(rel_path)
if isinstance(entity, RawDataFile) and not copy_raw:
continue
target = operational_landing_zone / rel_path
target.parent.mkdir(parents=True, exist_ok=True)
target.parent.chmod(0o777)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment