Merge remote-tracking branch 'origin/master' into 3287-feature-gms-user-update-after-change-user-settings

This commit is contained in:
Claus-Peter Huebner 2024-02-21 17:26:40 +01:00
commit ac44565e2e
2 changed files with 8 additions and 2 deletions

View File

@ -128,8 +128,10 @@ 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,
// ?? operator don't work here as expected
FEDERATION_VALIDATE_COMMUNITY_TIMER: 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

View File

@ -8,6 +8,7 @@ import { FederatedCommunityLoggingView } from '@logging/FederatedCommunityLoggin
import { FederationClient as V1_0_FederationClient } from '@/federation/client/1_0/FederationClient'
import { PublicCommunityInfo } from '@/federation/client/1_0/model/PublicCommunityInfo'
import { FederationClientFactory } from '@/federation/client/FederationClientFactory'
import { LogError } from '@/server/LogError'
import { backendLogger as logger } from '@/server/logger'
import { startCommunityAuthentication } from './authenticateCommunities'
@ -15,6 +16,9 @@ import { PublicCommunityInfoLoggingView } from './client/1_0/logging/PublicCommu
import { ApiVersionType } from './enum/apiVersionType'
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...`,
)