mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-24 12:05:16 +00:00
feat: add backgroundJobs endpoint
This commit is contained in:
parent
67a9615347
commit
72f2b6d6d8
|
@ -696,6 +696,15 @@ export function createBotSubStore(botId: string, botName: string) {
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async getBackgroundJobs() {
|
||||||
|
try {
|
||||||
|
const { data } = await api.get<BackgroundTaskStatus[]>('/background');
|
||||||
|
return Promise.resolve(data);
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
return Promise.reject(error);
|
||||||
|
}
|
||||||
|
},
|
||||||
async getBackgroundJobStatus(jobId: string) {
|
async getBackgroundJobStatus(jobId: string) {
|
||||||
try {
|
try {
|
||||||
const { data } = await api.get<BackgroundTaskStatus>(`/background/${jobId}`);
|
const { data } = await api.get<BackgroundTaskStatus>(`/background/${jobId}`);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user