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:
parent
f99f289f74
commit
ae095baad3
1 changed files with 4 additions and 0 deletions
|
@ -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`, {
|
||||
|
|
Loading…
Reference in a new issue