Skip to content

Instantly share code, notes, and snippets.

View camilomartinez's full-sized avatar

Camilo Martinez camilomartinez

  • Amsterdam, Netherlands
View GitHub Profile
@camilomartinez
camilomartinez / callback_retry_clear_subdag.py
Last active May 28, 2021 15:47 — forked from nathairtras/callback_retry_clear_subdag.py
Callback to clear Airflow SubDag on retry
import logging
from airflow.models import DagBag
def callback_subdag_clear(context):
"""Clears a subdag's tasks on retry."""
dag_id = "{}.{}".format(
context['dag'].dag_id,
context['ti'].task_id,
)
execution_date = context['execution_date']
@camilomartinez
camilomartinez / DesignAwareDispatcherHelper
Last active August 29, 2015 14:23
Check design mode before calling MVVM light Distpatcher helper
using System;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Threading;
namespace MvvmLight.Helpers
{
public class DesignAwareDispatcherHelper
{
// ReSharper disable once InconsistentNaming
public static void CheckDesignModeInvokeOnUI(Action action)