Skip to content
Snippets Groups Projects
Commit 258a66b5 authored by Ian's avatar Ian Committed by Ian
Browse files

fix: propagate KeyboardInterrupt in Job and JobManager.submit()

parent 227157db
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,8 @@ class Job: ...@@ -31,6 +31,8 @@ class Job:
"""Call a MAAP function, catch and log exceptions.""" """Call a MAAP function, catch and log exceptions."""
try: try:
return fn(*args, **kwargs) return fn(*args, **kwargs)
except KeyboardInterrupt:
raise
except Exception as e: except Exception as e:
logging.error(f"MAAP API error in {fn.__name__}: {e}") logging.error(f"MAAP API error in {fn.__name__}: {e}")
return None return None
......
...@@ -54,6 +54,8 @@ class JobManager: ...@@ -54,6 +54,8 @@ class JobManager:
job.submit() job.submit()
self.ledger.add_job(job) self.ledger.add_job(job)
job_batch_counter += 1 job_batch_counter += 1
except KeyboardInterrupt:
raise
except Exception as e: except Exception as e:
logging.error(f"Error submitting job: {e}") logging.error(f"Error submitting job: {e}")
continue continue
......
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