Commit 32ffff94 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

update dag_run_id

parent 503f7508
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
import json
from astropy import time
import numpy as np
import string
import os


def gen_dag_run_id(digits=10):
def gen_dag_run_id(digits=6):
    """
    Generate a unique run_id for a dag.
    """
    now = time.Time.now()
    dag_run_id = now.iso[:10].replace("-", "")
    dag_run_id = now.strftime("%Y%m%d-%H%M%S-")

    n = len(string.ascii_lowercase)
    for i in range(digits):