remove comments

This commit is contained in:
Claus-Peter Hübner 2022-07-13 18:52:11 +02:00
parent c805f85f75
commit 14619384a4
2 changed files with 1 additions and 32 deletions

View File

@ -2,19 +2,6 @@ import { EventProtocol } from '@entity/EventProtocol'
import decimal from 'decimal.js-light'
import { EventProtocolType } from './EventProtocolType'
/*
export interface EventInterface {
type: string
createdAt: Date
userId: number
xUserId?: number
xCommunityId?: number
transactionId?: number
contributionId?: number
amount?: Decimal
}
*/
export class EventBasic {
type: string
createdAt: Date

View File

@ -1,8 +1,6 @@
import { Event } from '@/event/Event'
import { backendLogger as logger } from '@/server/logger'
// import { EventProtocolType } from './EventProtocolType'
import { EventProtocol } from '@entity/EventProtocol'
// import { getConnection } from '@dbTools/typeorm'
import CONFIG from '@/config'
class EventProtocolEmitter {
@ -23,7 +21,7 @@ class EventProtocolEmitter {
}
public async writeEvent(event: Event): Promise<void> {
// if (!eventProtocol.isEnabled()) return
if (!eventProtocol.isEnabled()) return
logger.info(`writeEvent(${JSON.stringify(event)})`)
const dbEvent = new EventProtocol()
dbEvent.type = event.type
@ -38,19 +36,3 @@ class EventProtocolEmitter {
}
}
export const eventProtocol = new EventProtocolEmitter()
/*
eventProtocol.on('error', (err) => {
logger.error(`ERROR in EventProtocol: ${err}`)
})
eventProtocol.on('writeEvents', async (events: Event[]) => {
for (let i = 0; i < events.length; i++) {
await writeEvent(events[i])
}
})
eventProtocol.on('writeEvent', async (event: Event) => {
await writeEvent(event)
})
*/