Skip to content

Commit

Permalink
feat(job-runner): allow BaseExceptions to terminate the program (#6730
Browse files Browse the repository at this point in the history
)

Catching BaseException without re-raising the exception is not a good
idea. this will catch KeyboardInterrupt, which in turn makes it not
possible to use Ctrl-C to kill the web server.

Let's change that

Co-authored-by: Rachel Chen <[email protected]>
  • Loading branch information
xurui-c and Rachel Chen authored Jan 8, 2025
1 parent b45cc6a commit 6498761
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snuba/admin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,7 @@ def execute_job(job_id: str) -> Response:
job_status = None
try:
job_status = run_job(job_specs[job_id])
except BaseException as e:
except Exception as e:
return make_response(
jsonify(
{
Expand Down

0 comments on commit 6498761

Please sign in to comment.