diff --git a/apps/api/src/services/logging/crawl_log.ts b/apps/api/src/services/logging/crawl_log.ts index 76a06072..1224bd44 100644 --- a/apps/api/src/services/logging/crawl_log.ts +++ b/apps/api/src/services/logging/crawl_log.ts @@ -2,8 +2,9 @@ import { supabase_service } from "../supabase"; import "dotenv/config"; export async function logCrawl(job_id: string, team_id: string) { - try { - const { data, error } = await supabase_service + if (process.env.USE_DB_AUTHENTICATION === 'true') { + try { + const { data, error } = await supabase_service .from("bulljobs_teams") .insert([ { @@ -11,7 +12,8 @@ export async function logCrawl(job_id: string, team_id: string) { team_id: team_id, }, ]); - } catch (error) { - console.error("Error logging crawl job:\n", error); + } catch (error) { + console.error("Error logging crawl job:\n", error); + } } } diff --git a/docker-compose.yaml b/docker-compose.yaml index b1de4330..b88f3ed8 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -56,6 +56,7 @@ services: - redis - playwright-service - api + command: [ "pnpm", "run", "workers" ] redis: image: redis:alpine