Hyperlinkv0.9.0-beta.0

Daemon

Daemon.schedulefunctionsrc/Daemon.ts:2132
(windows: ReadonlyArray<ScheduleWindow>): <Self, S extends Spec>(
  tag: HyperlinkTag<Self, S>
) => HyperlinkTag<Self, S & ScheduleGroupSpec>
(source: HyperlinkTag<any, ScheduleHyperlinkSpec>): <
  Self,
  S extends Spec
>(
  tag: HyperlinkTag<Self, S>
) => HyperlinkTag<Self, S>

Attach a schedule to a daemon (pipeable). Two forms, distinguished by argument:

  • inline windows — the daemon owns an in-memory schedule seeded with windows, and its contract gains the schedule verb group (entries / set / add / clear):
class Matches extends Daemon.Tag<Matches>()("app/Matches").pipe(
  Daemon.schedule([Daemon.window(kickoff, final)]),
) {}
  • an external Schedule — the daemon is gated by a shared schedule resource and gains no schedule verbs (they live on the HyperService, which can arm many daemons at once):
class IngestScores extends Daemon.Tag<IngestScores>()("app/IngestScores").pipe(
  Daemon.schedule(SeasonSchedule),
) {}
scheduleSchedule
Source src/Daemon.ts:213222 lines
export function schedule(
  windows: ReadonlyArray<ScheduleWindow>,
): <Self, S extends Spec>(tag: HyperlinkTag<Self, S>) => HyperlinkTag<Self, S & ScheduleGroupSpec>;
export function schedule(
  source: