mirror of
https://github.com/IT4Change/gradido.git
synced 2026-03-01 12:44:43 +00:00
23 lines
583 B
TypeScript
23 lines
583 B
TypeScript
import { AppDatabase } from 'database'
|
|
import { initLogging } from '@/server/logger'
|
|
import { exportEventDataToKlickTipp } from './klicktipp'
|
|
|
|
async function executeKlicktipp(): Promise<boolean> {
|
|
initLogging()
|
|
const connection = AppDatabase.getInstance()
|
|
await connection.init()
|
|
if (connection.isConnected()) {
|
|
await exportEventDataToKlickTipp()
|
|
await connection.destroy()
|
|
return true
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
|
|
executeKlicktipp().catch((e) => {
|
|
// biome-ignore lint/suspicious/noConsole: logger isn't used here
|
|
console.error(e)
|
|
process.exit(1)
|
|
})
|