"""
        Takes an event from an instance of itself, and triggers all dependent
        tasks to resume.
        """
        for task_instance in session.query(TaskInstance).filter(
            TaskInstance.trigger_id == trigger_id, TaskInstance.state == State.DEFERRED
        ):
            
            next_kwargs = task_instance.next_kwargs or {}
            next_kwargs["event"] = event.payload
            task_instance.next_kwargs = next_kwargs
            
            task_instance.trigger_id = None
            
            task_instance.state = State.SCHEDULED
    @classmethod
    @provide_session
    def submit_failure(cls, trigger_id, exc=None, session=None):