fix(migration): stop polling when job status is 'completed'
Backend returns "completed" but pollJob only checked "done"/"complete", causing infinite polling and oscillating UI state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e521fd8e58
commit
5cf415d38a
|
|
@ -207,7 +207,7 @@ export async function pollJob(jobId, onProgress) {
|
||||||
const data = await api.migrate.batchStatus(jobId);
|
const data = await api.migrate.batchStatus(jobId);
|
||||||
if (onProgress) onProgress(data);
|
if (onProgress) onProgress(data);
|
||||||
|
|
||||||
if (data.status === 'done' || data.status === 'complete') {
|
if (data.status === 'done' || data.status === 'complete' || data.status === 'completed') {
|
||||||
setState('lastMigrationResults', data);
|
setState('lastMigrationResults', data);
|
||||||
resolve(data);
|
resolve(data);
|
||||||
} else if (data.status === 'failed') {
|
} else if (data.status === 'failed') {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue