Skip to content

Commit

Permalink
sync outroot files
Browse files Browse the repository at this point in the history
  • Loading branch information
gbrammer committed Jan 20, 2025
1 parent c572440 commit 04410cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions msaexp/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ def handle_spectrum_extraction(**event):
else:
xobj = None

files = glob.glob(f"{root}*{key}.spec.fits")
files = glob.glob(f"{outroot}*{key}.spec.fits")
if len(files) == 0:
status = 9
info = None
Expand Down Expand Up @@ -959,7 +959,7 @@ def handle_spectrum_extraction(**event):
# Send files
send_command = (
f'aws s3 sync ./ {s3_base}/{root}/ --exclude "*" '
+ f'--include "{root}*{key}.*" --acl public-read'
+ f'--include "{outroot}*{key}.*" --acl public-read'
)
print(f"# send to s3: {send_command}")

Expand All @@ -977,7 +977,7 @@ def handle_spectrum_extraction(**event):
db.execute(SQL)

if event["clean"]:
files = glob.glob(f"{root}*{key}.*")
files = glob.glob(f"{outroot}*{key}.*")
files += glob.glob(f"jw*{key}.*")
for file in files:
print(f"rm {file}")
Expand Down

0 comments on commit 04410cb

Please sign in to comment.