fix(update): add a timeout for deployment/rebuild and add a cancel button.

This commit is contained in:
KodekaTeam committed 2026-06-06 00:22:04 +07:00
1 parent c30f828d2c
commit 81622b5a4c
8 files changed
+443 -19

No files matched your search

+14 -1
View File
@@ -1561,12 +1561,19 @@ export interface ProcessJobLogEntry {
export interface ProcessJobRecord {
id: string;
type: string;
status: "queued" | "running" | "success" | "error";
status:
| "queued"
| "running"
| "cancelling"
| "cancelled"
| "success"
| "error";
createdAt: string;
updatedAt: string;
logs: ProcessJobLogEntry[];
result?: unknown;
error?: string;
cancelReason?: string;
}
function parseServerSentEventBlock(block: string) {
@@ -1622,6 +1629,12 @@ export const containers = {
get<{ success: boolean; data: ProcessJobRecord }>(
`/containers/jobs/${jobId}`,
),
cancelJob: (jobId: string) =>
post<{ success: boolean; data: ProcessJobRecord; message?: string }>(
`/containers/jobs/${jobId}/cancel`,
{},
{ timeoutMs: 15000 },
),
streamJob: async (
jobId: string,
handlers: {