Skip to content
Snippets Groups Projects
Commit 0b9adf47 authored by Fabian Simon Lex's avatar Fabian Simon Lex
Browse files

Improved error handling to properly communicate exception of config file not being created

parent e0efdf97
No related branches found
No related tags found
No related merge requests found
Pipeline #5344397 failed
......@@ -342,8 +342,8 @@ def main(argv=None):
#submission_settings.append((args, misc.createSteeringFile(log, args, steering_string, suffix), parameters))
steering_filename = misc.createSteeringFile(log, args, steering_string, suffix)
results.append(submitJobs(log, pool, args, steering_filename, parameters))
except:
log.warning(f"Could not create submission file {steering_string} with suffix {suffix}")
except Exception as e:
log.error(f"Could not create submission file with suffix {suffix} due to {e}")
# Return to old directory:
if args.subdir:
......
......@@ -163,7 +163,9 @@ def poolChecker(results, heartbeat = 1):
""" checks the status of parallel pool """
import time
log = logging.getLogger('jobsub')
if None not in results:
if results == []:
log.warning("There were problems with the submission")
elif None not in results:
# parallel loop checker from https://stackoverflow.com/a/70666333
while True:
log.debug("Heartbeat")
......@@ -186,3 +188,4 @@ def poolChecker(results, heartbeat = 1):
# raise exception reporting exceptions received from workers
if all(ready) and not all(successful):
raise Exception(f'Workers raised following exceptions {[result._value for result in results if not result.successful()]}')
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment