aboutsummaryrefslogtreecommitdiff
path: root/bh20seqanalyzer
diff options
context:
space:
mode:
authorPeter Amstutz2020-07-16 12:32:43 -0400
committerPeter Amstutz2020-07-16 12:33:07 -0400
commit6bfefe984a84fb215d61e045c49a4ab123bb7339 (patch)
tree86609a1d6b57dfac7ccbeb3ef3bcf6b36f677853 /bh20seqanalyzer
parent0e84b18cb134855d572d1f94d5d3c43571afe7e9 (diff)
downloadbh20-seq-resource-6bfefe984a84fb215d61e045c49a4ab123bb7339.tar.gz
bh20-seq-resource-6bfefe984a84fb215d61e045c49a4ab123bb7339.tar.lz
bh20-seq-resource-6bfefe984a84fb215d61e045c49a4ab123bb7339.zip
Catch exceptions
Add script to cleanup bad uploads. Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>
Diffstat (limited to 'bh20seqanalyzer')
-rw-r--r--bh20seqanalyzer/main.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/bh20seqanalyzer/main.py b/bh20seqanalyzer/main.py
index f2bb234..f18a93a 100644
--- a/bh20seqanalyzer/main.py
+++ b/bh20seqanalyzer/main.py
@@ -364,17 +364,20 @@ def main():
logging.info("Starting up, monitoring %s for uploads" % (args.uploader_project))
while True:
- seqanalyzer.move_fastq_to_fasta_results()
+ try:
+ seqanalyzer.move_fastq_to_fasta_results()
- new_collections = arvados.util.list_all(api.collections().list, filters=[["owner_uuid", "=", args.uploader_project]])
- at_least_one_new_valid_seq = False
- for c in new_collections:
- at_least_one_new_valid_seq = seqanalyzer.validate_upload(c, args.revalidate) or at_least_one_new_valid_seq
+ new_collections = arvados.util.list_all(api.collections().list, filters=[["owner_uuid", "=", args.uploader_project]])
+ at_least_one_new_valid_seq = False
+ for c in new_collections:
+ at_least_one_new_valid_seq = seqanalyzer.validate_upload(c, args.revalidate) or at_least_one_new_valid_seq
- if at_least_one_new_valid_seq and not args.no_start_analysis:
- seqanalyzer.start_pangenome_analysis()
+ if at_least_one_new_valid_seq and not args.no_start_analysis:
+ seqanalyzer.start_pangenome_analysis()
- seqanalyzer.copy_most_recent_result()
+ seqanalyzer.copy_most_recent_result()
+ except Exception as e:
+ logging.exeception("Error in main loop")
if args.once:
break