Repository navigation
feat: give customer Loom imports their own importer lane - #3131
Merged
Merged
Conversation
Member
Author
|
hey @greptileai, please re-review the PR |
richiemcilroy
marked this pull request as ready for review
October 24, 2026 19:26
| destination: folderId ? { folderId } : {}, | ||
| migrationRequestId, | ||
| migrationLeaseToken, | ||
| importPriority, |
There was a problem hiding this comment.
Concierge migrations enter the customer lane
Medium Severity
The unchanged importConciergeCsvRows caller in apps/web/actions/loom.ts invokes processLoomCsvRows without importPriority. The admin migration UI dispatches successive CSV batches through this operator-only path, so the undefined value forwarded here becomes customer in processVideoOnMediaServer. A sufficiently large or slow concierge migration can therefore occupy the reserved customer slots and queue ahead of interactive imports, defeating the new isolation. Pass importPriority: "bulk" from the concierge caller, or derive that lane from its migrationRequestId, while retaining the customer default for user imports.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Customer Loom imports now get their own lane on the Loom importer, so they no longer wait behind operator redrives and CSV backfills.
flowchart LR subgraph web D[Dashboard / agent API / mobile / Retry] -->|importPriority: customer| W[import-loom-video workflow] R[Internal redrive + CSV routes] -->|importPriority: bulk| W C[Recovery crons] -->|lane from the run receipt| W end W -->|POST /video/import| I subgraph I[Loom importer] Q1[customer queue] --> S[slots] Q2[bulk queue] --> S endLOOM_IMPORTER_MAX_JOBSslots. Customer imports getLOOM_IMPORTER_CUSTOMER_JOBSextra slots (default 16) on top, and are started first when a general slot frees (apps/media-server/src/loom-importer/app.ts).Semaphore.run(work, priority)infetch.ts).LOOM_IMPORTER_MAX_QUEUEDlimit, so a full bulk queue no longer returnsSERVER_BUSYto customers.bulk(loom-import-redrive.ts,api/internal/loom-imports/csv). Everything else, including the agent API and Retry, iscustomer. The label is stored onmetadata.loomImportRun.importPriorityso recovery restarts keep it.importPriority. The media fleet request body is unchanged.Benchmark
Same box (c7gd.4xlarge importer host), test importer with 2 general slots, 1 customer slot, 48 shared connections. Each run imports a real 53-minute Loom webinar (HLS, 779 MB) 6 times as bulk; "mixed" adds one customer import of the same video 5 s in. Runs alternated base, new, new, base.
mainmainthe customer wait grows with the size of the bulk queue. Today a customer agent import waited 3 to 7 minutes behind a 1,216-video redrive.

Confidence Score: 5/5
The PR appears safe to merge; no blocking issues were found.Summary
Gives customer Loom imports a separate queue and extra running slots.
No actionable issues were found. No previous review threads were supplied.
Reviews (2) · Last reviewed commit: "feat(web): label operator Loom imports a..." · Reviewed by Greptile