Skip to content

Commit

Permalink
Copy live to dcache (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
cfuselli authored Dec 11, 2023
1 parent 7be1bbc commit fccd1cf
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions amstrax/auto_processing/copy_live.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,16 @@ def handle_runs(rundocs, args):

live_data_path = os.path.join(path, run_id)

# Copy to stoomboot
copied_stomboot = copy_data(run_id, live_data_path, STORAGE_PATHS['stbc'], 'stbc', args.production, args.ssh_host)

# Optionally copy to dcache
if copied_stomboot and not args.only_stoomboot:
if not any(d['type'] == 'live' and d['host'] == 'dcache' for d in rd['data']):
# Check if data is on stoomboot and copy if not
copied_stomboot = False
if not any(d['type'] == 'live' and d['host'] == 'stbc' for d in rd['data']):
copied_stomboot = copy_data(run_id, live_data_path, STORAGE_PATHS['stbc'], 'stbc', args.production, args.ssh_host)
else:
copied_stomboot = True

if copied_stomboot:
# Check if data is on dcache and copy if not (and if not only_stoomboot)
if not args.only_stoomboot and (not any(d['type'] == 'live' and d['host'] == 'dcache' for d in rd['data'])):
copy_data(run_id, live_data_path, STORAGE_PATHS['dcache'], 'dcache', args.production, args.ssh_host)
runs_copied = True

Expand Down

0 comments on commit fccd1cf

Please sign in to comment.