Skip to content

Commit

Permalink
bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
valayDave committed Apr 10, 2022
1 parent c17f04a commit af91099
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions metaflow/plugins/airflow/airflow_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ def _get_schedule(self):
# Using the cron presets provided here :
# https://airflow.apache.org/docs/apache-airflow/stable/dag-run.html?highlight=schedule%20interval#cron-presets
schedule = self.flow._flow_decorators.get("schedule")
if self.attributes["cron"]:
if schedule.attributes["cron"]:
return schedule.attributes["cron"]
elif self.attributes["weekly"]:
elif schedule.attributes["weekly"]:
return "@weekly"
elif self.attributes["hourly"]:
elif schedule.attributes["hourly"]:
return "@hourly"
elif self.attributes["daily"]:
elif schedule.attributes["daily"]:
return "@daily"
return None

Expand Down

0 comments on commit af91099

Please sign in to comment.