def METHOD_NAME(task, state, meta):
    try:
        if task:
            task.update_state(state=state, meta=meta)
    except (TypeError, NotImplementedError):
        pass
    except IntegrityError:
        # Not called in task context just pass
        pass