Allow starting the bot even after the persistence was improperly closed

This commit is contained in:
kageru 2019-11-06 07:33:27 +01:00
parent 2be20880b8
commit 58307c9743
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2

View File

@ -4,7 +4,7 @@ import org.mapdb.DBMaker
import org.mapdb.Serializer
object Dao {
private val db = DBMaker.fileDB("kagebot.db").fileMmapEnable().closeOnJvmShutdown().make()
private val db = DBMaker.fileDB("kagebot.db").checksumHeaderBypass().fileMmapEnable().closeOnJvmShutdown().make()
private val prisoners = db.hashMap("timeout", Serializer.LONG, Serializer.LONG_ARRAY).createOrOpen()
private val commands = db.hashMap("commands", Serializer.STRING, Serializer.INTEGER).createOrOpen()
private val tempVcs = db.hashSet("vcs", Serializer.STRING).createOrOpen()