mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix(server): avoid false restore failures on large database imports (#27420)
* fix(server): increase restore health check timeout and reject with Error * chore: clean up --------- Co-authored-by: André Erasmus <25480506+NoBadDays@users.noreply.github.com> Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
@@ -36,15 +36,17 @@ export class MaintenanceHealthRepository {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
worker.on('exit', (code, signal) => reject(`Server health check failed, server exited with ${signal ?? code}`));
|
worker.on('exit', (code, signal) =>
|
||||||
worker.on('error', (error) => reject(`Server health check failed, process threw: ${error}`));
|
reject(new Error(`Server health check failed, server exited with ${signal ?? code}`)),
|
||||||
|
);
|
||||||
|
worker.on('error', (error) => reject(new Error(`Server health check failed, process threw: ${error}`)));
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (worker.exitCode === null) {
|
if (worker.exitCode === null) {
|
||||||
reject('Server health check failed, took too long to start.');
|
reject(new Error('Server health check failed, took too long to start.'));
|
||||||
worker.kill('SIGTERM');
|
worker.kill('SIGTERM');
|
||||||
}
|
}
|
||||||
}, 20_000);
|
}, 180_000);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user