mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-10-23 06:46:11 +08:00
Add redux actions/reducers for groups
This commit is contained in:
@@ -58,6 +58,10 @@ export interface ListQueueStatsResponse {
|
||||
stats: { [qname: string]: DailyStat[] };
|
||||
}
|
||||
|
||||
export interface ListGroupsResponse {
|
||||
groups: GroupInfo[];
|
||||
}
|
||||
|
||||
export interface RedisInfoResponse {
|
||||
address: string;
|
||||
info: RedisInfo;
|
||||
@@ -250,6 +254,11 @@ export interface RedisInfo {
|
||||
used_memory_startup: string;
|
||||
}
|
||||
|
||||
export interface GroupInfo {
|
||||
group: string;
|
||||
size: number;
|
||||
}
|
||||
|
||||
export interface Queue {
|
||||
queue: string;
|
||||
paused: boolean;
|
||||
@@ -376,6 +385,14 @@ export async function listQueueStats(): Promise<ListQueueStatsResponse> {
|
||||
return resp.data;
|
||||
}
|
||||
|
||||
export async function listGroups(qname: string): Promise<ListGroupsResponse> {
|
||||
const resp = await axios({
|
||||
method: "get",
|
||||
url: `${getBaseUrl()}/queues/${qname}`,
|
||||
});
|
||||
return resp.data;
|
||||
}
|
||||
|
||||
export async function getTaskInfo(
|
||||
qname: string,
|
||||
id: string
|
||||
|
Reference in New Issue
Block a user