mirror of
https://github.com/immich-app/immich.git
synced 2024-11-24 08:52:28 +02: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
@ -3,6 +3,10 @@ const port = Number(process.env.IMMICH_PORT) || 3001;
|
|||||||
const controller = new AbortController();
|
const controller = new AbortController();
|
||||||
|
|
||||||
const main = async () => {
|
const main = async () => {
|
||||||
|
if (!process.env.IMMICH_WORKERS_INCLUDE?.includes('api')) {
|
||||||
|
process.exit();
|
||||||
|
}
|
||||||
|
|
||||||
const timeout = setTimeout(() => controller.abort(), 2000);
|
const timeout = setTimeout(() => controller.abort(), 2000);
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`http://localhost:${port}/api/server-info/ping`, {
|
const response = await fetch(`http://localhost:${port}/api/server-info/ping`, {
|
||||||
|
Loading…
Reference in New Issue
Block a user