From fdc73ae668f153d32e667069a046303d4672de3c Mon Sep 17 00:00:00 2001 From: Julian Edwards Date: Fri, 3 May 2024 08:13:14 +1000 Subject: [PATCH] Fix job_failed signal parameters Fix a missing err parameter on the job_failed handler in the flask_spinach object. --- spinach/contrib/flask_spinach.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spinach/contrib/flask_spinach.py b/spinach/contrib/flask_spinach.py index be9bd99..c33ed84 100644 --- a/spinach/contrib/flask_spinach.py +++ b/spinach/contrib/flask_spinach.py @@ -54,12 +54,12 @@ def job_finished(*args, job=None, **kwargs): pass @signals.job_failed.connect_via(namespace) - def job_failed(args, job=None, **kwargs): + def job_failed(args, job=None, err=None, **kwargs): if not flask.has_app_context(): ctx = app.app_context() ctx.push() flask.g.spinach_ctx = ctx - self.job_failed(job) + self.job_failed(job, err) @classmethod def job_started(cls, *args, job=None, **kwargs): @@ -82,7 +82,7 @@ def job_finished(cls, *args, job=None, **kwargs): pass @classmethod - def job_failed(cls, *args, job=None, **kwargs): + def job_failed(cls, *args, job=None, err=None, **kwargs): """Callback for subclasses to receive job_failed signals. There's no guarantee of ordering for Signal's callbacks,