code: def task_succeeded(sender=None, **kwargs):  # pylint: disable=unused-argument
      
      if isinstance(sender, UserTaskMixin):
          status = sender.status
          # Failed tasks with good exception handling did not succeed just because they ended cleanly
          if status.state not in (UserTaskStatus.CANCELED, UserTaskStatus.FAILED, UserTaskStatus.RETRYING):
              status.succeed()
          user_task_stopped.send_robust(sender=UserTaskStatus, status=sender.status)
docs: Update the status record accordingly when a :py:class:`UserTaskMixin` finishes successfully.