(resolvedId: string | undefined)
| 638 | } |
| 639 | |
| 640 | #pullResolved(resolvedId: string | undefined): Promise<ApplyResult> { |
| 641 | return withSpan( |
| 642 | this.#observer, |
| 643 | "workspace.sync.pull", |
| 644 | { "workspace.sync.backend": resolvedId }, |
| 645 | async () => { |
| 646 | if (resolvedId === undefined || this.#moduleBackendsById.has(resolvedId)) { |
| 647 | return { applied: 0, skipped: [] }; |
| 648 | } |
| 649 | const handle = await this.#handleFor(resolvedId); |
| 650 | if (handle.sync === "none") return { applied: 0, skipped: [] }; |
| 651 | return this.#runWithInvalidation(resolvedId, handle, () => |
| 652 | pullOnce(this.#db, handle.rpc.sync, resolvedId), |
| 653 | ); |
| 654 | }, |
| 655 | (span, outcome) => { |
| 656 | if (!outcome.ok) return; |
| 657 | span.setAttribute("workspace.sync.applied", outcome.value.applied); |
| 658 | span.setAttribute("workspace.sync.skipped", outcome.value.skipped.length); |
| 659 | }, |
| 660 | ); |
| 661 | } |
| 662 | |
| 663 | async #schedulePendingSync(id: string): Promise<void> { |
| 664 | const scheduler = this.#retryScheduler; |
no test coverage detected