opt: make sure the Upscale and Variation task is assign to the same mj service with Image task

This commit is contained in:
RockYang
2023-12-18 16:34:33 +08:00
parent 245cd3ee1a
commit abf4f061c1
11 changed files with 68 additions and 11 deletions

View File

@@ -581,7 +581,7 @@ const fetchRunningJobs = (userId) => {
}
runningJobs.value = _jobs
setTimeout(() => fetchRunningJobs(userId), 5000)
setTimeout(() => fetchRunningJobs(userId), 3000)
}).catch(e => {
ElMessage.error("获取任务失败:" + e.message)
@@ -592,7 +592,7 @@ const fetchFinishJobs = (userId) => {
// 获取已完成的任务
httpGet(`/api/mj/jobs?status=1&user_id=${userId}`).then(res => {
finishedJobs.value = res.data
setTimeout(() => fetchFinishJobs(userId), 5000)
setTimeout(() => fetchFinishJobs(userId), 3000)
}).catch(e => {
ElMessage.error("获取任务失败:" + e.message)
})
@@ -660,6 +660,8 @@ const variation = (index, item) => {
const send = (url, index, item) => {
httpPost(url, {
index: index,
task_id: item.task_id,
channel_id: item.channel_id,
message_id: item.message_id,
message_hash: item.hash,
session_id: getSessionId(),

View File

@@ -598,7 +598,7 @@ onMounted(() => {
}
runningJobs.value = _jobs
setTimeout(() => fetchRunningJobs(userId), 5000)
setTimeout(() => fetchRunningJobs(userId), 3000)
}).catch(e => {
ElMessage.error("获取任务失败:" + e.message)
})
@@ -608,7 +608,7 @@ onMounted(() => {
const fetchFinishJobs = (userId) => {
httpGet(`/api/sd/jobs?status=1&user_id=${userId}`).then(res => {
finishedJobs.value = res.data
setTimeout(() => fetchFinishJobs(userId), 5000)
setTimeout(() => fetchFinishJobs(userId), 3000)
}).catch(e => {
ElMessage.error("获取任务失败:" + e.message)
})