Skip to content

Instantly share code, notes, and snippets.

View ferruzzi's full-sized avatar

D. Ferruzzi ferruzzi

  • AWS
  • Vancouver, BC
View GitHub Profile
@ferruzzi
ferruzzi / basic_test_dags.py
Created November 14, 2024 00:49
A few basic DAGs which come in handy for Airflow debugging
from datetime import datetime
from time import sleep
from airflow import DAG
from airflow.decorators import task
from airflow.utils.dates import days_ago
with DAG(dag_id="5_min", schedule_interval=None, start_date=days_ago(1)) as dag:
@task
function setProtection(msg, location) {
/** *******************************************
- check if new base is already protected
- if timer remaining is within reup time, then
- cancel old timers
- set new timers
**********************************************/
const ensureLocation = new Promise((resolve, reject) => {
if (location) {
resolve(location);