Add run retry task, run scheduled task functionality

This commit is contained in:
Ken Hibino
2020-12-19 06:35:08 -08:00
parent f527b0c6d8
commit a454f2f094
7 changed files with 207 additions and 2 deletions

View File

@@ -253,6 +253,16 @@ export async function listDeadTasks(
return resp.data;
}
export async function runScheduledTask(
qname: string,
taskKey: string
): Promise<void> {
await axios({
method: "post",
url: `${BASE_URL}/queues/${qname}/scheduled_tasks/${taskKey}:run`,
});
}
export async function deleteScheduledTask(
qname: string,
taskKey: string
@@ -305,6 +315,16 @@ export async function runAllScheduledTasks(qname: string): Promise<void> {
});
}
export async function runRetryTask(
qname: string,
taskKey: string
): Promise<void> {
await axios({
method: "post",
url: `${BASE_URL}/queues/${qname}/retry_tasks/${taskKey}:run`,
});
}
export async function deleteRetryTask(
qname: string,
taskKey: string