Skip to content

Commit

Permalink
Fixed defaults passing
Browse files Browse the repository at this point in the history
- Addressed comments for airflow.py
  • Loading branch information
valayDave committed Jul 28, 2022
1 parent b9387dd commit 1202f5b
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions metaflow/plugins/airflow/airflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ def __init__(
self.parameters = None
_, self.graph_structure = self.graph.output_steps()
self.worker_pool = worker_pool
# replace with `is_paused_upon_creation`
self.is_paused_upon_creation = is_paused_upon_creation
self._set_scheduling_interval()

Expand Down Expand Up @@ -575,21 +574,15 @@ def _to_airflow_dag_file(self, json_dag):
),
)

# Not sure what is happening here. This can simply be the listed defaults in
# the DAG template.
def _create_defaults(self):
defu_ = {
"owner": get_username(),
# If set on a task, doesn’t run the task in the current DAG run if the previous run of the task has failed.
"depends_on_past": False,
# TODO: Enable emails
"email": [],
"email_on_failure": False,
"email_on_retry": False,
"retries": 0,
"execution_timeout": timedelta(days=5),
# check https://airflow.apache.org/docs/apache-airflow/stable/_api/airflow/models/baseoperator/index.html?highlight=retry_delay#airflow.models.baseoperator.BaseOperatorMeta
"retry_delay": timedelta(seconds=5),
}
if self.worker_pool is not None:
defu_["pool"] = self.worker_pool
Expand Down

0 comments on commit 1202f5b

Please sign in to comment.