mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2026-08-31 19:03:45 +02:00
Make the ping interval configurable
This commit is contained in:
+4
-2
@@ -15,10 +15,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// note: soem configuration parameters are read directly at the location where they are used
|
||||
// note: some configuration parameters are read directly at the location where they are used
|
||||
interface Config {
|
||||
mailWhitelist: Array<string>
|
||||
disableSignup: boolean
|
||||
pingInterval: number
|
||||
}
|
||||
|
||||
function parseYesNo (value: string) {
|
||||
@@ -33,5 +34,6 @@ function parseYesNo (value: string) {
|
||||
|
||||
export const config: Config = {
|
||||
mailWhitelist: (process.env.MAIL_WHITELIST || '').split(',').map((item) => item.trim()).filter((item) => item.length > 0),
|
||||
disableSignup: parseYesNo(process.env.DISABLE_SIGNUP || 'no')
|
||||
disableSignup: parseYesNo(process.env.DISABLE_SIGNUP || 'no'),
|
||||
pingInterval: parseInt(process.env.PING_INTERVAL_SEC || '25', 10) * 1000
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user