From fa4e35ee131dcfb9392fdbb6067e793ceaa8621d Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Mon, 12 Jan 2026 17:56:45 +0000 Subject: [PATCH] Changes --- src/components/BlueprintsQueue.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/BlueprintsQueue.tsx b/src/components/BlueprintsQueue.tsx index b239eb0..531fa51 100644 --- a/src/components/BlueprintsQueue.tsx +++ b/src/components/BlueprintsQueue.tsx @@ -39,9 +39,9 @@ const CLICKHOUSE_PASSWORD = "Q9Cd5Z3j72NypTdNwKV7E7H83mv35mRc"; const TYPESENSE_URL = "https://eve-typesense.site.quack-lab.dev"; const TYPESENSE_KEY = "#L46&&8UeJGE675zRR3kqzd6K!k6an7w"; -// For write operations, you may need a different user with write permissions -const CLICKHOUSE_WRITE_USER = "indy_jobs_rw_user"; -const CLICKHOUSE_WRITE_PASSWORD = "WritePassword123"; // Update with actual write credentials +// Using same credentials for read/write - update if you have separate write user +const CLICKHOUSE_WRITE_USER = CLICKHOUSE_USER; +const CLICKHOUSE_WRITE_PASSWORD = CLICKHOUSE_PASSWORD; export interface BlueprintQueueItem { id: string; @@ -65,12 +65,18 @@ async function ensureTableExists(): Promise { ORDER BY (added_at, id) `; - await fetch(`${CLICKHOUSE_URL}/?query=${encodeURIComponent(createTableQuery)}`, { + const response = await fetch(`${CLICKHOUSE_URL}/?query=${encodeURIComponent(createTableQuery)}`, { method: 'POST', headers: { 'Authorization': 'Basic ' + btoa(CLICKHOUSE_WRITE_USER + ":" + CLICKHOUSE_WRITE_PASSWORD), }, }); + + if (!response.ok) { + const text = await response.text(); + console.error('Failed to create table:', text); + // Don't throw - let the select try anyway in case table exists + } } async function fetchBlueprintQueue(): Promise {