From f560da3f50d8d4ee1b834c1253f9553a76823053 Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Thu, 23 Sep 2021 21:29:40 +0100 Subject: [PATCH] Added more accurate logging --- ukmonPostProc.py | 2 ++ uploadToArchive.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ukmonPostProc.py b/ukmonPostProc.py index 4ca2505..85b5c9a 100644 --- a/ukmonPostProc.py +++ b/ukmonPostProc.py @@ -86,12 +86,14 @@ def rmsExternal(cap_dir, arch_dir, config): # stack and create jpgs from the potential detections log.info('stacking the FF files') sff.stackFFs(arch_dir, 'jpg', filter_bright=True) + log.info('creating JPGs') try: bff2i.batchFFtoImage(arch_dir, 'jpg', True) except: bff2i.batchFFtoImage(arch_dir, 'jpg') myloc = os.path.split(os.path.abspath(__file__))[0] + log.info('app home is {}'.format(myloc)) try: f = open(os.path.join(myloc, 'domp4s'),'r') f.close() diff --git a/uploadToArchive.py b/uploadToArchive.py index b392128..16cf19c 100644 --- a/uploadToArchive.py +++ b/uploadToArchive.py @@ -50,9 +50,9 @@ def uploadOneFile(arch_dir, dir_file, s3, targf, file_ext, log=None): log.info(desf) except Exception: if log is None: - print('file not present: {}'.format(dir_file)) + print('upload failed: {}'.format(dir_file)) else: - log.info('file not present: {}'.format(dir_file)) + log.info('upload failed: {}'.format(dir_file)) return