Add delete button for scheduled and dead tasks

This commit is contained in:
Ken Hibino
2020-12-09 06:56:44 -08:00
parent 601a7c8add
commit ce978f4516
7 changed files with 303 additions and 18 deletions

View File

@@ -243,6 +243,16 @@ export async function listDeadTasks(
return resp.data;
}
export async function deleteScheduledTask(
qname: string,
taskKey: string
): Promise<void> {
await axios({
method: "delete",
url: `${BASE_URL}/queues/${qname}/scheduled_tasks/${taskKey}`,
});
}
export async function deleteRetryTask(
qname: string,
taskKey: string
@@ -253,6 +263,16 @@ export async function deleteRetryTask(
});
}
export async function deleteDeadTask(
qname: string,
taskKey: string
): Promise<void> {
await axios({
method: "delete",
url: `${BASE_URL}/queues/${qname}/dead_tasks/${taskKey}`,
});
}
export async function listSchedulerEntries(): Promise<ListSchedulerEntriesResponse> {
const resp = await axios({
method: "get",