mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-10-07 20:52:02 +08:00
Add delete button for scheduled and dead tasks
This commit is contained in:
@@ -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",
|
||||
|
Reference in New Issue
Block a user