"""
        Test that the dag file processor will not crash when trying to send
        sla miss notification for a deleted task
        """
        session = settings.Session()
        test_start_date = timezone.utcnow() - datetime.timedelta(days=1)
        dag, task = create_dummy_dag(
            dag_id="test_sla_miss",
            task_id="dummy",
            email="test@test.com",
            default_args={"start_date": test_start_date, "sla": datetime.timedelta(hours=1)},
        )
        session.merge(TaskInstance(task=task, execution_date=test_start_date, state="Success"))
        
        session.merge(
            SlaMiss(task_id="dummy_deleted", dag_id="test_sla_miss", execution_date=test_start_date)
        )
        mock_log = mock.MagicMock()
        dag_file_processor = DagFileProcessor(dag_ids=[], dag_directory=TEST_DAGS_FOLDER, log=mock_log)
        dag_file_processor.manage_slas(dag=dag, session=session)
    @patch.object(TaskInstance, "handle_failure")
    def test_execute_on_failure_callbacks(self, mock_ti_handle_failure):