mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
delete foreign federated community entries on startCommunityValidation
This commit is contained in:
parent
58b85c7bda
commit
fca7283671
@ -10,10 +10,13 @@ import { backendLogger as logger } from '@/server/logger'
|
||||
|
||||
import { ApiVersionType } from './enum/apiVersionType'
|
||||
|
||||
export function startValidateCommunities(timerInterval: number): void {
|
||||
export async function startValidateCommunities(timerInterval: number): Promise<void> {
|
||||
logger.info(
|
||||
`Federation: startValidateCommunities loop with an interval of ${timerInterval} ms...`,
|
||||
)
|
||||
// delete all foreign federated community entries to avoid increasing validation efforts and log-files
|
||||
await DbFederatedCommunity.delete({ foreign: true })
|
||||
|
||||
// TODO: replace the timer-loop by an event-based communication to verify announced foreign communities
|
||||
// better to use setTimeout twice than setInterval once -> see https://javascript.info/settimeout-setinterval
|
||||
setTimeout(function run() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user