ddstats-server/libs/database/sqlite2mongo.js

22 lines
588 B
JavaScript
Raw Normal View History

import initLog from '../utils/log.js'
2021-10-06 19:52:40 +02:00
import { checkForFinishes, checkForMaps, checkForPlayers } from './sqlite2mongo/checks.js'
import postTasks from './sqlite2mongo/postTasks.js'
2021-09-29 20:29:06 +02:00
const log = initLog("sqlite2mongo")
2021-10-06 20:36:20 +02:00
/**
* This function handles the sqlite database provided by DDNet and
* migrates the data to mongodb.
* @module libs/database/sqlite2mongo
*/
2021-09-29 20:29:06 +02:00
async function sqlite2mongo() {
log("Checking for additions to 'ddnet.sqlite'...")
2021-10-09 23:52:41 +02:00
await checkForMaps()
await checkForPlayers()
await checkForFinishes()
2021-10-06 19:52:40 +02:00
await postTasks()
2021-09-29 20:29:06 +02:00
}
export default sqlite2mongo