From 947ea7a4d73b22cbbb10c92cd3744375efef5e53 Mon Sep 17 00:00:00 2001 From: janr Date: Mon, 20 Apr 2026 11:29:06 +0200 Subject: [PATCH] remove setSlug startup call; slug now set via RT-CV dashboard --- lib/server.ts | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/lib/server.ts b/lib/server.ts index ed12fdf..9780945 100644 --- a/lib/server.ts +++ b/lib/server.ts @@ -26,7 +26,7 @@ export interface ServerOptions { f2fAlternativeApp?: string | false // If not set will try to use F2F_ALTERNATIVE_APP env variable (same format), if set to false will disable alternative app port?: number // If not set will try to use SERVER_PORT or default to: 3000 noHealthChecks?: boolean // If set to true will disable health checks on the RT-CV server - skipSlugCheck?: boolean // If set to true will not check and update the slug on the RT-CV server + skipSlugCheck?: boolean // If set to true will not enforce that the scraper has a slug configured skipAliveCheck?: boolean // If set to true will skip the check if the scraper is allowed to scrape customHandlers?: CustomHandler[] // If set will add external handlers to the server @@ -205,8 +205,6 @@ export class Server { }) } - if (!options.skipSlugCheck) this.setSlug() - if (options.customHandlers) { try { this.addCustomHandler(options.customHandlers) @@ -917,31 +915,6 @@ export class Server { return response } - private async setSlug() { - console.log("Setting slug in rt-cv...") - - let slugResponse: { - slug: string - oldSlug: string - overwroteExisting: boolean - } - try { - slugResponse = await this.fetchWithRetry(this.isAppMode ? "/api/private/scraper/set-slug" : "/api/v1/scraper/setSlug", { - method: "PUT", - body: { slug: this.slug }, - }) - } catch (e) { - console.log("error setting slug,", e) - return - } - - if (slugResponse.overwroteExisting) { - console.log( - `Warning: Overwrote existing slug ('${slugResponse.oldSlug}') with '${slugResponse.slug}'`, - ) - } - } - private mightGetEnv(k: string): string { return process.env[k] || "" }