feat(TRUEREF-0023): add sqlite-vec search pipeline
This commit is contained in:
16
src/routes/api/v1/workers/+server.ts
Normal file
16
src/routes/api/v1/workers/+server.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import type { RequestHandler } from './$types';
|
||||
import { getPool } from '$lib/server/pipeline/startup.js';
|
||||
import { handleServiceError } from '$lib/server/utils/validation.js';
|
||||
|
||||
export const GET: RequestHandler = () => {
|
||||
try {
|
||||
const pool = getPool();
|
||||
if (!pool) {
|
||||
return new Response('Service unavailable', { status: 503 });
|
||||
}
|
||||
|
||||
return Response.json(pool.getStatus());
|
||||
} catch (error) {
|
||||
return handleServiceError(error);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user