diff --git a/fill_photometry_details.py b/fill_photometry_details.py index c1ebae6..ab432f8 100644 --- a/fill_photometry_details.py +++ b/fill_photometry_details.py @@ -20,7 +20,7 @@ #for row in db.cursor.fetchall(): # # fileid_phot = row['fileid'] - # filepath = os.path.join('/flows/archive_photometry/', row['path']) + # filepath = os.path.join('/archive/photometry/', row['path']) # # tab = Table.read(filepath, format='ascii.ecsv') # @@ -102,7 +102,7 @@ for row in db.cursor.fetchall(): fileid_phot = row['fileid'] - filepath = os.path.join('/data/flows/archive/archive_photometry/', row['path']) + filepath = os.path.join('/archive/photometry/', row['path']) tab = Table.read(filepath, format='ascii.ecsv') print(len(tab)) diff --git a/fix_filehash.py b/fix_filehash.py index 649423a..02f3e20 100644 --- a/fix_filehash.py +++ b/fix_filehash.py @@ -18,7 +18,7 @@ p = row['path'].replace('.fits', '.fits.gz') - fpath = os.path.join('/data/flows/archive/archive', p) + fpath = os.path.join('/archive/raw', p) try: fsize = os.path.getsize(fpath) fhash = get_filehash(fpath) diff --git a/flows_create_visibility_plots.py b/flows_create_visibility_plots.py index 8dcfdce..223fb81 100644 --- a/flows_create_visibility_plots.py +++ b/flows_create_visibility_plots.py @@ -89,7 +89,7 @@ def init_poolmanager(self, connections, maxsize, block=False): m = regex_year.match(tgt['target_name']) year = int(m.group(1)) - outdir = os.path.join('/data/flows/archive/candidates', str(year), tgt['target_name']) + outdir = os.path.join('/archive/candidates', str(year), tgt['target_name']) # If running in fast mode, jump over everything if args.fast and (tgt['inserted'] < yesterday or os.path.isdir(outdir)): diff --git a/run_ingest.py b/run_ingest.py index 4f80393..101c8e8 100644 --- a/run_ingest.py +++ b/run_ingest.py @@ -109,8 +109,8 @@ def create_plot(filepath, target_coord=None, target_position=None): # -------------------------------------------------------------------------------------------------- def ingest_from_inbox(): - rootdir_inbox = '/data/flows/archive/inbox' - rootdir = '/data/flows/archive/archive' + rootdir_inbox = '/archive/inbox' + rootdir = '/archive/raw' logger = logging.getLogger(__name__) @@ -395,8 +395,8 @@ def ingest_from_inbox(): # Set file and directory permissions: # TODO: Can this not be handled in a more elegant way? - os.chmod(os.path.dirname(newpath), 0o2750) - os.chmod(newpath, 0o0440) + os.chmod(os.path.dirname(newpath), 0o2775) + os.chmod(newpath, 0o0444) filesize = os.path.getsize(fpath) @@ -453,8 +453,8 @@ def ingest_from_inbox(): # -------------------------------------------------------------------------------------------------- def ingest_photometry_from_inbox(): - rootdir_inbox = '/data/flows/archive/inbox' - rootdir_archive = '/data/flows/archive/archive_photometry' + rootdir_inbox = '/archive/inbox' + rootdir_archive = '/archive/photometry' logger = logging.getLogger(__name__) @@ -748,11 +748,11 @@ def ingest_photometry_from_inbox(): else: # Set file and directory permissions: # TODO: Can this not be handled in a more elegant way? - os.chmod(os.path.join(rootdir_archive, targetname), 0o2750) - os.chmod(os.path.join(rootdir_archive, targetname, f'{fileid_img:05d}'), 0o2750) - os.chmod(os.path.join(rootdir_archive, targetname, f'{fileid_img:05d}', f'v{new_version:02d}'), 0o2550) + os.chmod(os.path.join(rootdir_archive, targetname), 0o2775) + os.chmod(os.path.join(rootdir_archive, targetname, f'{fileid_img:05d}'), 0o2775) + os.chmod(os.path.join(rootdir_archive, targetname, f'{fileid_img:05d}', f'v{new_version:02d}'), 0o2555) for f in os.listdir(os.path.dirname(newpath)): - os.chmod(os.path.join(os.path.dirname(newpath), f), 0o0440) + os.chmod(os.path.join(os.path.dirname(newpath), f), 0o0444) logger.info("DELETE THE ORIGINAL FILE") if os.path.isfile(fpath): @@ -767,7 +767,7 @@ def cleanup_inbox(): """ Cleanup of inbox directory """ - rootdir_inbox = '/data/flows/archive/inbox' + rootdir_inbox = '/archive/inbox' # Just a simple check to begin with: if not os.path.isdir(rootdir_inbox):