aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2021-01-03 16:01:35 -0600
committertlatorre <tlatorre@uchicago.edu>2021-01-03 16:01:35 -0600
commitb0ebf6e6baa12bd98cf0bfb11331b2a422906d15 (patch)
tree5185629e75c4819c43407b881dea0fc020c272df
parentc528bf6c0e166e49eadfafd15a9ccc9d384d818f (diff)
downloadsddm-b0ebf6e6baa12bd98cf0bfb11331b2a422906d15.tar.gz
sddm-b0ebf6e6baa12bd98cf0bfb11331b2a422906d15.tar.bz2
sddm-b0ebf6e6baa12bd98cf0bfb11331b2a422906d15.zip
speed up submit-grid-jobs
This commit updates submit-grid-jobs to not run zdab-cat if the file has already been submitted.
-rwxr-xr-xutils/submit-grid-jobs10
1 files 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: