mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-24 03:55:15 +00:00
chore: improved function naming
This commit is contained in:
parent
72f2b6d6d8
commit
8b8a7a0f06
|
@ -23,17 +23,17 @@ export function useBackgroundJob() {
|
||||||
try {
|
try {
|
||||||
result.value = await getBackgroundJobStatus(jobId);
|
result.value = await getBackgroundJobStatus(jobId);
|
||||||
if (!result.value.running) {
|
if (!result.value.running) {
|
||||||
clearJobFromList();
|
clearJobFromRunningList();
|
||||||
}
|
}
|
||||||
jobs.value[jobId] = { ...jobs.value[jobId], taskStatus: result.value };
|
jobs.value[jobId] = { ...jobs.value[jobId], taskStatus: result.value };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
showAlert('Failed to get background job status', 'error');
|
showAlert('Failed to get background job status', 'error');
|
||||||
clearJobFromList();
|
clearJobFromRunningList();
|
||||||
}
|
}
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
function clearJobFromList() {
|
function clearJobFromRunningList() {
|
||||||
if (interval) {
|
if (interval) {
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,7 @@ export function useBackgroundJob() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const runningJobs = computed(() => jobs.value);
|
const runningJobs = computed(() => jobs.value);
|
||||||
|
|
||||||
function clearJobs() {
|
function clearJobs() {
|
||||||
// Clear all jobs that are not running
|
// Clear all jobs that are not running
|
||||||
for (const [jobId, job] of Object.entries(jobs.value)) {
|
for (const [jobId, job] of Object.entries(jobs.value)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user