예제 #1
0
 def validate(self) -> None:
     try:
         croniter(self._expression)
     except (CroniterBadCronError, CroniterBadDateError) as e:
         raise AirflowTimetableInvalid(str(e))
예제 #2
0
 def validate(self) -> None:
     now = datetime.datetime.now()
     if (now + self._delta) <= now:
         raise AirflowTimetableInvalid(f"schedule interval must be positive, not {self._delta!r}")
예제 #3
0
 def validate(self) -> None:
     if self._delta.total_seconds() <= 0:
         raise AirflowTimetableInvalid("schedule interval must be positive")