diff --git a/jobsub/jobsub.py b/jobsub/jobsub.py index 6facde1ae2d3a69f2c8cc9ccb613e1cba35e002e..1629d27f9afe4c47f2b99b7f675ac592f233e5ea 100755 --- a/jobsub/jobsub.py +++ b/jobsub/jobsub.py @@ -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: diff --git a/jobsub/misc.py b/jobsub/misc.py index 2187015015a59ef8fef49b8acf4a046bd25efdfe..35c083e1eac1890806e88fc4faf367177d061bb4 100644 --- a/jobsub/misc.py +++ b/jobsub/misc.py @@ -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