Skip to content

Commit

Permalink
Merge pull request #9012 from gem/abort-notification
Browse files Browse the repository at this point in the history
On calc aborted before starting, raise an exception, thus avoiding to notify successful completion
  • Loading branch information
micheles authored Sep 14, 2023
2 parents 5734b10 + f5d167d commit 40fbe70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openquake/engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def expose_outputs(dstore, owner=USER, status='complete'):
if 'loss_curves-stats' in dstore:
dskeys.add('loss_maps-stats')
if 'ruptures' in dskeys:
if 'scenario' in calcmode or len(dstore['ruptures']) == 0:
if 'scenario' in calcmode or len(dstore['ruptures']) == 0:
# do not export, as requested by Vitor
exportable.remove('ruptures')
else:
Expand Down Expand Up @@ -389,7 +389,7 @@ def run_jobs(jobctxs, concurrent_jobs=3):
# the job aborted even before starting
for job in jobctxs:
logs.dbcmd('finish', job.calc_id, 'aborted')
return jobctxs
raise
for job in jobctxs:
dic = {'status': 'executing', 'pid': _PID,
'start_time': datetime.utcnow()}
Expand Down

0 comments on commit 40fbe70

Please sign in to comment.