This commit is contained in:
gpt-engineer-app[bot]
2026-01-12 17:56:45 +00:00
parent 59a9c46abc
commit fa4e35ee13

View File

@@ -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<void> {
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<BlueprintQueueItem[]> {