fase(8): sqlite job queue system
This commit is contained in:
@@ -137,6 +137,23 @@ export interface FindingTable {
|
||||
resolved_at: number | null;
|
||||
}
|
||||
|
||||
export interface JobTable {
|
||||
id: string;
|
||||
type: string;
|
||||
status: string;
|
||||
payload: string;
|
||||
result: string | null;
|
||||
error: string | null;
|
||||
attempts: number;
|
||||
max_attempts: number;
|
||||
priority: number;
|
||||
run_at: string;
|
||||
started_at: string | null;
|
||||
completed_at: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface Database {
|
||||
sessions: SessionTable;
|
||||
states: StateTable;
|
||||
@@ -148,6 +165,7 @@ export interface Database {
|
||||
visual_comparisons: VisualComparisonTable;
|
||||
performance_metrics: PerformanceMetricTable;
|
||||
findings: FindingTable;
|
||||
jobs: JobTable;
|
||||
}
|
||||
|
||||
export function createDatabase(config: { driver: string; path: string; url?: string }): Kysely<Database> {
|
||||
|
||||
Reference in New Issue
Block a user