Spaces:
Sleeping
Sleeping
Download apps/api/src/controllers/v0/admin/concurrency-queue-backfill.ts from s-eto-hub/firecrawl-api: direct link, hf CLI and curl.
- Browser
- Download file 726 Bytes
-
https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/apps/api/src/controllers/v0/admin/concurrency-queue-backfill.ts
- Command line
-
hf download hf://spaces/s-eto-hub/firecrawl-api/apps/api/src/controllers/v0/admin/concurrency-queue-backfill.ts
-
curl -L -o concurrency-queue-backfill.ts https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/apps/api/src/controllers/v0/admin/concurrency-queue-backfill.ts
726 Bytes
| import { logger as _logger } from "../../../lib/logger"; | |
| import { Request, Response } from "express"; | |
| import { reconcileConcurrencyQueue } from "../../../lib/concurrency-queue-reconciler"; | |
| export async function concurrencyQueueBackfillController( | |
| req: Request, | |
| res: Response, | |
| ) { | |
| const logger = _logger.child({ | |
| module: "concurrencyQueueBackfillController", | |
| }); | |
| logger.info("Starting concurrency queue backfill"); | |
| const teamId = | |
| typeof req.query.teamId === "string" | |
| ? (req.query.teamId as string) | |
| : undefined; | |
| const summary = await reconcileConcurrencyQueue({ | |
| teamId, | |
| logger, | |
| }); | |
| logger.info("Finished backfilling all teams", summary); | |
| res.json({ ok: true, ...summary }); | |
| } | |