From b0ebf6e6baa12bd98cf0bfb11331b2a422906d15 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Sun, 3 Jan 2021 16:01:35 -0600 Subject: speed up submit-grid-jobs This commit updates submit-grid-jobs to not run zdab-cat if the file has already been submitted. --- utils/submit-grid-jobs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/utils/submit-grid-jobs b/utils/submit-grid-jobs index e1c9b96..863f033 100755 --- a/utils/submit-grid-jobs +++ b/utils/submit-grid-jobs @@ -545,6 +545,11 @@ if __name__ == '__main__': log.warn("Skipping %s because the file size is %i MB!" % (filename, os.path.getsize(filename)/1e6)) continue + if not args.reprocess and filename in unique_filenames: + head, tail = split(filename) + log.notice("Skipping %s because it's already in the database" % tail) + continue + with open(os.devnull, 'w') as f: # Create a temporary file to store the events. Docs recommended # this method instead of mkstemp(), but I think they're the same. @@ -564,11 +569,6 @@ if __name__ == '__main__': if len(ev) == 0: continue - if len(ev) and not args.reprocess and filename in unique_filenames: - head, tail = split(filename) - log.notice("Skipping %s because it's already in the database" % tail) - continue - head, tail = split(filename) if 'muon' in tail: -- cgit