mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-10-07 20:52:02 +08:00
Add delete task button to RetryTasksTable
This commit is contained in:
@@ -79,12 +79,14 @@ export interface PendingTask extends BaseTask {
|
||||
|
||||
export interface ScheduledTask extends BaseTask {
|
||||
id: string;
|
||||
key: string;
|
||||
queue: string;
|
||||
next_process_at: string;
|
||||
}
|
||||
|
||||
export interface RetryTask extends BaseTask {
|
||||
id: string;
|
||||
key: string;
|
||||
queue: string;
|
||||
next_process_at: string;
|
||||
max_retry: number;
|
||||
@@ -94,6 +96,7 @@ export interface RetryTask extends BaseTask {
|
||||
|
||||
export interface DeadTask extends BaseTask {
|
||||
id: string;
|
||||
key: string;
|
||||
queue: string;
|
||||
max_retry: number;
|
||||
retried: number;
|
||||
@@ -240,6 +243,16 @@ export async function listDeadTasks(
|
||||
return resp.data;
|
||||
}
|
||||
|
||||
export async function deleteRetryTask(
|
||||
qname: string,
|
||||
taskKey: string
|
||||
): Promise<void> {
|
||||
await axios({
|
||||
method: "delete",
|
||||
url: `${BASE_URL}/queues/${qname}/retry_tasks/${taskKey}`,
|
||||
});
|
||||
}
|
||||
|
||||
export async function listSchedulerEntries(): Promise<ListSchedulerEntriesResponse> {
|
||||
const resp = await axios({
|
||||
method: "get",
|
||||
|
Reference in New Issue
Block a user