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

    Function queueMirror

    • Queues one mirror operation, or declines to.

      The four call sites -- write, delete, and both halves of a rename -- had the same upsert copied out four times, which is four places for the refusal above to be forgotten in. One helper makes "a private file is never enqueued" a property of the module rather than of four call sites that happen to agree today.

      A delete is gated by the same predicate rather than always queued, and that is correct rather than lax: a private URI has no R2 object to remove because it was never allowed to have one. The case that matters is rename('public://a', 'private://b'), where the scheme is per-URI, so the put of private://b is refused while the delete of public://a still runs and clears the stale object.

      Parameters

      • sql: FileSql
      • uri: string
      • op: "put" | "delete"
      • nowMs: number

      Returns boolean

      whether anything was queued.