drupflare/worker - v1.0.0
    Preparing search index...

    Function restoreAlarmDecision

    • What the alarm chain should do after one slice of a chunked restore.

      Extracted rather than left inline for the reason migrateAlarmDelayMs was extracted: the inline version of that decision shipped a branch that could never be taken, and nothing noticed because an inline ternary in alarm() has no unit test. This one carries the halt, which is the branch whose absence once spun an object at 1 ms forever and starved every gated request behind it.

      Parameters

      • before: number

        the cursor position at the start of the firing

      • after: HeapRestoreCursor | null

        the cursor after it, or null when the restore finished or was abandoned

      Returns { action: "halt" | "continue" | "unblocked"; delayMs: number }