fix(update): add a timeout for deployment/rebuild and add a cancel button.
This commit is contained in:
1 parent
c30f828d2c
commit
81622b5a4c
8 files changed
+443
-19
No files matched your search
+14
-1
@@ -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: {
|
||||
|
||||
Reference in new issue
Block a user