Skip to content

Commit 10759c8

Browse files
authored
fix to large argument error (#460)
1 parent 8010d73 commit 10759c8

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

‎stixcore/processing/pipeline_cron.py‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,18 @@ def main():
326326

327327
if CONFIG.getboolean("Pipeline", "sync_tm_at_start", fallback=False):
328328
logger.info("start sync_tm_at_start")
329+
# let rsync do the filename matching: a shell glob over the incomming dir
330+
# expands to too many arguments and fails with "Argument list too long"
329331
res = subprocess.run(
330-
f"rsync -av /data/stix/SOLSOC/from_edds/tm/incomming/*PktTmRaw*.xml {str(tmpath)}", shell=True
331-
) # noqa
332+
[
333+
"rsync",
334+
"-av",
335+
"--include=*PktTmRaw*.xml",
336+
"--exclude=*",
337+
"/data/stix/SOLSOC/from_edds/tm/incomming/",
338+
f"{str(tmpath)}/",
339+
]
340+
)
332341
logger.info(f"done sync_tm_at_start: {str(res)}")
333342

334343
soop_path = Path(CONFIG.get("Paths", "soop_files"))

0 commit comments

Comments
 (0)