mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
invoke request getPubkicKey on each endpoint read from communities table
This commit is contained in:
parent
f227bb8d07
commit
bac9d7bd4d
@ -10,7 +10,7 @@ Decimal.set({
|
||||
})
|
||||
|
||||
const constants = {
|
||||
DB_VERSION: '0058-add_communities_table',
|
||||
DB_VERSION: '0059-add_verified_at_to communities',
|
||||
DECAY_START_TIME: new Date('2021-05-13 17:46:31-0000'), // GMT+0
|
||||
LOG4JS_CONFIG: 'log4js-config.json',
|
||||
// default log level on production should be info
|
||||
|
||||
@ -43,8 +43,8 @@ export async function requestGetPublicKey(fdCom: FdCommunity): Promise<string |
|
||||
return data.getPublicKey.publicKey
|
||||
}
|
||||
logger.warn(`requestGetPublicKey processed without response data`)
|
||||
return undefined
|
||||
} catch (err) {
|
||||
logger.error(`Request-Error: ${JSON.stringify(err)}`)
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
@ -6,10 +6,7 @@ import { FdCommunity } from './graphql/1_0/model/FdCommunity'
|
||||
export async function startValidateCommunities(timerInterval: number): Promise<void> {
|
||||
while (true) {
|
||||
const dbCommunities: DbCommunity[] = await DbCommunity.find({
|
||||
where: [
|
||||
{ verifiedAt: IsNull() },
|
||||
{ verifiedAt: LessThan(Raw((lastAnnouncedAt) => `${lastAnnouncedAt}`)) },
|
||||
],
|
||||
where: [{ verifiedAt: IsNull() }, { verifiedAt: LessThan(`last_announced_at:`) }],
|
||||
})
|
||||
if (dbCommunities) {
|
||||
dbCommunities.forEach(async function (dbCom) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user