diff options
author | Tor Andersson <tor@ccxvii.net> | 2025-01-21 13:14:32 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2025-01-29 00:26:56 +0100 |
commit | 44e8926ec4a4755cd7588831648aed842a07002e (patch) | |
tree | 166b8c6e2aa3d8c211ae7bea2eb013107801f644 | |
parent | 5e43c931dc46c3b6772326169dbd0c3fd425644f (diff) | |
download | server-44e8926ec4a4755cd7588831648aed842a07002e.tar.gz |
Enable/disable timeouts from .env configuration.
-rw-r--r-- | server.js | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -12,7 +12,8 @@ const sqlite3 = require("better-sqlite3") require("dotenv").config() -const DEBUG = process.env.DEBUG || 0 +const DEBUG = process.env.DEBUG | 0 +const TIMEOUT = process.env.TIMEOUT | 0 const ALTCHA = process.env.ALTCHA | 0 const HTTP_HOST = process.env.HTTP_HOST || "localhost" @@ -2722,8 +2723,10 @@ function time_control_ticker() { } // Run time control checks every 13 minutes. -setInterval(time_control_ticker, 13 * 60 * 1000) -setTimeout(time_control_ticker, 13 * 1000) +if (TIMEOUT) { + setInterval(time_control_ticker, 13 * 60 * 1000) + setTimeout(time_control_ticker, 13 * 1000) +} /* * TOURNAMENTS |