2024-04-26 01:06:58 +08:00
|
|
|
import { request } from '../request';
|
|
|
|
|
|
|
|
/** get Job page */
|
|
|
|
export function fetchGetJobBatchList(params?: Api.JobBatch.JobBatchSearchParams) {
|
|
|
|
return request<Api.JobBatch.JobBatchList>({
|
|
|
|
url: '/job/batch/list',
|
|
|
|
method: 'get',
|
|
|
|
params
|
|
|
|
});
|
|
|
|
}
|
2024-05-05 21:56:42 +08:00
|
|
|
|
|
|
|
export function fetchGetJobBatchDetail(id: string) {
|
|
|
|
return request<Api.JobBatch.JobBatch>({
|
|
|
|
url: `/job/batch/${id}`,
|
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
2024-05-12 14:38:15 +08:00
|
|
|
|
|
|
|
/** stop job */
|
|
|
|
export function fetchJobBatchStop(jobId: string) {
|
|
|
|
return request<boolean>({
|
|
|
|
url: `/job/batch/stop/${jobId}`,
|
|
|
|
method: 'post'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** retry job */
|
|
|
|
export function fetchJobBatchRetry(jobId: string) {
|
|
|
|
return request<boolean>({
|
|
|
|
url: `/job/batch/retry/${jobId}`,
|
|
|
|
method: 'post'
|
|
|
|
});
|
|
|
|
}
|
2024-07-09 10:39:34 +08:00
|
|
|
|
|
|
|
/** delete job */
|
|
|
|
export function fetchDeleteJobBatch(id: string) {
|
|
|
|
return request<boolean>({
|
2024-07-09 10:53:47 +08:00
|
|
|
url: `/job/batch/ids`,
|
|
|
|
method: 'delete',
|
|
|
|
data: [id]
|
2024-07-09 10:39:34 +08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** delete job */
|
|
|
|
export function fetchBatchDeleteJobBatch(data: string[]) {
|
|
|
|
return request<boolean>({
|
|
|
|
url: '/job/batch/ids',
|
|
|
|
method: 'delete',
|
|
|
|
data
|
|
|
|
});
|
|
|
|
}
|