Periodical.Coordinator.Claim (Periodical v0.2.0)

Copy Markdown View Source

One attempt to take the lease for a coordinated schedule.

  • :key — the schedule's store key, Periodical.Coordinator.key/1 of its name.
  • :name — the schedule name itself, for adapters that record it for operators.
  • :scheduled_at — the occurrence this instance is about to run, as this instance computed it.
  • :ttl_ms — how long the lease lasts from now, in milliseconds.
  • :token — unique to this attempt; the lease holder's identity.

Summary

Types

t()

One claim attempt.

Types

t()

@type t() :: %Periodical.Coordinator.Claim{
  key: String.t(),
  name: Periodical.schedule_name(),
  scheduled_at: DateTime.t(),
  token: String.t(),
  ttl_ms: pos_integer()
}

One claim attempt.