diff --git a/webservice/webservice.py b/webservice/webservice.py index 836829118b8d9c14eeaa376711d22e6192050829..8e9bfc9a343f8c288cd7b058c6a30cf688b6a3bb 100644 --- a/webservice/webservice.py +++ b/webservice/webservice.py @@ -9,6 +9,7 @@ import json import locale import logging import os +import re import sqlite3 import sys import time @@ -445,6 +446,12 @@ def update_job_db(config): time.sleep(time_interval) +# Do not copy over files of big detectors when they are not being +# corrected. +copy_blocklist_pattern = re.compile( + r'\S*RAW-R\d{4}-(AGIPD|LPD|DSSC)\d{2}-S\d{5}.h5$') + + async def copy_untouched_files(file_list): """ Copy those files which are not touched by the calibration to the output directory. @@ -454,6 +461,9 @@ async def copy_untouched_files(file_list): Copying is done via an asyncio subprocess call """ for f in file_list: + if copy_blocklist_pattern.match(f): + continue + of = f.replace("raw", "proc").replace("RAW", "CORR") cmd = ["rsync", "-av", f, of] await asyncio.subprocess.create_subprocess_shell(" ".join(cmd))