Skip to content

Commit

Permalink
Merge branch 'main' into scone
Browse files Browse the repository at this point in the history
  • Loading branch information
helenqu authored Oct 3, 2022
2 parents 72ad736 + c9b0955 commit cb2057e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion pippin/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ def execute(self, check_config, compress_output, uncompress_output):
n = len(squeue)
if n == 0 or n > self.max_jobs:
self.logger.debug(f"Squeue is reporting {n} NUM_JOBS in the queue... this is either 0 or toeing the line as to too many")
self.log_finals()
num_errs = self.log_finals()
return num_errs

def check_task_completion(self, t, squeue):
result = t.check_completion(squeue)
Expand Down Expand Up @@ -471,3 +472,4 @@ def log_finals(self):

for w in es:
self.logger.error(f"\t{w.message}")
return len(es)
7 changes: 5 additions & 2 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ def handler(signum, frame):
manager.set_finish(args.finish)
manager.set_force_refresh(args.refresh)
manager.set_force_ignore_stage(args.ignore)
manager.execute(args.check, args.compress, args.uncompress)
num_errs = manager.execute(args.check, args.compress, args.uncompress)
manager.num_errs = num_errs
chown_file(logging_filename)
return manager

Expand Down Expand Up @@ -255,5 +256,7 @@ def get_args(test=False):

if __name__ == "__main__":
args = get_args()
run(args)
manager = run(args)
sys.stdout.flush()
if manager.num_errs > 0:
raise(ValueError(f"{manager.num_errs} Errors found"))

0 comments on commit cb2057e

Please sign in to comment.