feat(frontend): add polling job queue ui

This commit is contained in:
2026-06-21 01:39:49 +03:30
parent 24a025587e
commit ac91428d49
36 changed files with 5674 additions and 0 deletions

45
frontend/src/types.ts Normal file
View File

@@ -0,0 +1,45 @@
export type JobStatus = "queued" | "running" | "succeeded" | "failed";
export type Job = {
id: string;
type: string;
payload: Record<string, unknown>;
status: JobStatus;
priority: number;
available_at: string;
attempts: number;
max_attempts: number;
idempotency_key: string | null;
locked_by: string | null;
locked_until: string | null;
last_error: string;
result: unknown;
created_at: string;
updated_at: string;
finished_at: string | null;
};
export type JobEvent = {
id: number;
job: string;
type: string;
attempt: number;
worker_id: string | null;
message: string;
data: Record<string, unknown>;
created_at: string;
};
export type JobStats = {
total: number;
by_status: Record<JobStatus, number>;
overdue_running: number;
retries_pending: number;
oldest_queued_at: string | null;
};
export type Health = {
ok: boolean;
database: string;
detail?: string;
};