diff --git a/swh/scheduler/task.py b/swh/scheduler/task.py --- a/swh/scheduler/task.py +++ b/swh/scheduler/task.py @@ -68,9 +68,12 @@ def on_success(self, retval, task_id, args, kwargs): self.statsd.increment("swh_task_success_count") - # this is a swh specific event. Used to attach the retval to the - # task_run - self.send_event("task-result", result=retval) + + # Respecting the configuration per task + if not self.ignore_result: + # we send the swh specific event used to attach the retval to the task_run. + # The listener is in charge of processing the event + self.send_event("task-result", result=retval) @property def log(self):