Skip to content

Commit

Permalink
Merge pull request #18122 from mvdbeek/log_exception_instead_of_error
Browse files Browse the repository at this point in the history
[24.0] Include traceback when logging email PJA exception
  • Loading branch information
dannon authored May 10, 2024
2 parents 5a88e40 + c2d6986 commit 4fd8ad0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/galaxy/job_execution/actions/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@

from galaxy.model import PostJobActionAssociation
from galaxy.model.base import transaction
from galaxy.util import (
send_mail,
unicodify,
)
from galaxy.util import send_mail
from galaxy.util.custom_logging import get_logger

log = get_logger(__name__)
Expand Down Expand Up @@ -70,8 +67,8 @@ def execute(cls, app, sa_session, action, job, replacement_dict, final_job_state
if link_invocation:
body += f"\n\nWorkflow Invocation Report:\n{link_invocation}"
send_mail(app.config.email_from, to, subject, body, app.config)
except Exception as e:
log.error("EmailAction PJA Failed, exception: %s", unicodify(e))
except Exception:
log.exception("EmailAction PJA Failed")

@classmethod
def get_short_str(cls, pja):
Expand Down

0 comments on commit 4fd8ad0

Please sign in to comment.