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

    Function recordClaimed

    • Records a claimed site, and makes it primary when asked and no site is primary or claimed yet.

      asPrimary is set by a first claim only, so an existing two-site deployment does not get a primary chosen by whichever ran first. Read-modify-write on one key: a concurrent loser records itself again on its next run.

      Parameters

      • kv: DeploymentKv | undefined
      • site: string
      • asPrimary: boolean

      Returns Promise<DeploymentSites | undefined>

      the document as written, or undefined when the binding cannot be written