1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 15:11:58 +00:00

fix(server): only run healthchecks when api worker is running on immich-server (#10204)

fix: only run healthchecks when api worker is running on immich-server
This commit is contained in:
Zack Pollard 2024-06-12 12:44:30 +01:00 committed by GitHub
parent f99f289f74
commit ae095baad3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,6 +3,10 @@ const port = Number(process.env.IMMICH_PORT) || 3001;
const controller = new AbortController();
const main = async () => {
if (!process.env.IMMICH_WORKERS_INCLUDE?.includes('api')) {
process.exit();
}
const timeout = setTimeout(() => controller.abort(), 2000);
try {
const response = await fetch(`http://localhost:${port}/api/server-info/ping`, {