Nick: formatting fixes
This commit is contained in:
@@ -7,11 +7,7 @@ import {
|
||||
RequestWithAuth,
|
||||
toLegacyCrawlerOptions,
|
||||
} from "./types";
|
||||
import {
|
||||
crawlToCrawler,
|
||||
saveCrawl,
|
||||
StoredCrawl,
|
||||
} from "../../lib/crawl-redis";
|
||||
import { crawlToCrawler, saveCrawl, StoredCrawl } from "../../lib/crawl-redis";
|
||||
import { logCrawl } from "../../services/logging/crawl_log";
|
||||
import { _addScrapeJobToBullMQ } from "../../services/queue-jobs";
|
||||
import { logger as _logger } from "../../lib/logger";
|
||||
@@ -103,20 +99,25 @@ export async function crawlController(
|
||||
|
||||
await saveCrawl(id, sc);
|
||||
|
||||
await _addScrapeJobToBullMQ({
|
||||
url: req.body.url,
|
||||
mode: "kickoff" as const,
|
||||
team_id: req.auth.team_id,
|
||||
plan: req.auth.plan,
|
||||
crawlerOptions,
|
||||
scrapeOptions: sc.scrapeOptions,
|
||||
internalOptions: sc.internalOptions,
|
||||
origin: "api",
|
||||
crawl_id: id,
|
||||
webhook: req.body.webhook,
|
||||
v1: true,
|
||||
}, {}, crypto.randomUUID(), 10);
|
||||
|
||||
await _addScrapeJobToBullMQ(
|
||||
{
|
||||
url: req.body.url,
|
||||
mode: "kickoff" as const,
|
||||
team_id: req.auth.team_id,
|
||||
plan: req.auth.plan,
|
||||
crawlerOptions,
|
||||
scrapeOptions: sc.scrapeOptions,
|
||||
internalOptions: sc.internalOptions,
|
||||
origin: "api",
|
||||
crawl_id: id,
|
||||
webhook: req.body.webhook,
|
||||
v1: true,
|
||||
},
|
||||
{},
|
||||
crypto.randomUUID(),
|
||||
10,
|
||||
);
|
||||
|
||||
const protocol = process.env.ENV === "local" ? req.protocol : "https";
|
||||
|
||||
return res.status(200).json({
|
||||
|
||||
Reference in New Issue
Block a user