comptime Taxi = Pipeline[
"taxi", Download, Load, Compact,
partitions=Monthly["2011-01"],
schedule=Cron["0 3 2 * *", "America/New_York"], # 03:00 on the 2nd
fills=Previous, # last month
]
A fire at some time fills the partition the time falls in on the schedule's
wall clock (Current), or the one before it (Previous, the default): a
monthly load that runs on the 2nd loads the month that just ended.
catchup=False tells the scheduler to start only the latest of the fires it
missed while it was down. The scheduler itself is phase 2's next PR; until
then a schedule is declared, checked, and shown by describe and fires.
Structs
Fill
struct Fill
Which partition a fire fills.
Implements Copyable, Equatable, ImplicitlyCopyable, Movable, RegisterPassable, TrivialRegisterPassable, Writable
- Fields
value: Int
__eq__
def __eq__(self, other: Self) -> Bool
write_to
def write_to(self, mut writer: T)
NoSchedule
struct NoSchedule
Runs only when started by hand or by a backfill.
Implements Movable, ScheduleLike
expr
def expr() -> StaticString
zone
def zone() -> StaticString
Cron
struct Cron[cron: StringSpan[ImmStaticOrigin], tz: StringSpan[ImmStaticOrigin] = StringSpan("UTC")]
Fires when cron matches on the wall clock of time zone tz.
Implements Movable, ScheduleLike
expr
def expr() -> StaticString
zone
def zone() -> StaticString
Schedule
struct Schedule
A pipeline's schedule, parsed and with its zone loaded.
Implements Copyable, Movable
- Fields
cron: CronExprzone: Zone
of
def of[S: ScheduleLike]() -> Self
next_fire
def next_fire(self, after: Int64) -> Int64