Commit 5215b297 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

force dag_run values to be string

parent aed244f3
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -162,6 +162,12 @@ class BaseDAG:
            priority=priority,
        )

    @staticmethod
    def force_string(d: dict):
        for k, v in d.items():
            d.__setattr__(k, str(v))
        return d

    def gen_dag_run(self, **kwargs) -> dict:
        """Generate a complete DAG run message.

@@ -189,6 +195,8 @@ class BaseDAG:
            dag_run,
            {"dag": self.dag, "dag_run": self.generate_sha1()},
        )
        # force values to be string
        dag_run = self.force_string(dag_run)
        return dag_run

    @staticmethod