mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
replace ?? with ||, check if FEDERATION_VALIDATE_COMMUNITY_TIMER is valid number
This commit is contained in:
parent
eedd9fa3ac
commit
aeb7a7d2be
@ -128,8 +128,8 @@ if (
|
||||
|
||||
const federation = {
|
||||
FEDERATION_BACKEND_SEND_ON_API: process.env.FEDERATION_BACKEND_SEND_ON_API ?? '1_0',
|
||||
FEDERATION_VALIDATE_COMMUNITY_TIMER:
|
||||
Number(process.env.FEDERATION_VALIDATE_COMMUNITY_TIMER) ?? 60000,
|
||||
FEDERATION_VALIDATE_COMMUNITY_TIMER: // ?? operator don't work here as expected
|
||||
Number(process.env.FEDERATION_VALIDATE_COMMUNITY_TIMER) || 60000,
|
||||
FEDERATION_XCOM_SENDCOINS_ENABLED:
|
||||
process.env.FEDERATION_XCOM_SENDCOINS_ENABLED === 'true' ?? false,
|
||||
// default value for community-uuid is equal uuid of stage-3
|
||||
|
||||
@ -13,8 +13,12 @@ import { backendLogger as logger } from '@/server/logger'
|
||||
import { startCommunityAuthentication } from './authenticateCommunities'
|
||||
import { PublicCommunityInfoLoggingView } from './client/1_0/logging/PublicCommunityInfoLogging.view'
|
||||
import { ApiVersionType } from './enum/apiVersionType'
|
||||
import { LogError } from '@/server/LogError'
|
||||
|
||||
export async function startValidateCommunities(timerInterval: number): Promise<void> {
|
||||
if (Number.isNaN(timerInterval) || timerInterval <= 0) {
|
||||
throw new LogError('FEDERATION_VALIDATE_COMMUNITY_TIMER is not a positive number')
|
||||
}
|
||||
logger.info(
|
||||
`Federation: startValidateCommunities loop with an interval of ${timerInterval} ms...`,
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user