refactored database

This commit is contained in:
Kevin Jahns
2015-10-14 19:28:19 +02:00
parent ee133ef334
commit 181595293f
10 changed files with 79 additions and 170 deletions

View File

@@ -41,11 +41,11 @@ class AbstractConnector {
this.broadcastedHB = false
this.syncingClients = []
this.whenSyncedListeners = []
this.y.db.stopGarbageCollector()
return this.y.db.stopGarbageCollector()
}
setUserId (userId) {
this.userId = userId
this.y.db.setUserId(userId)
return this.y.db.setUserId(userId)
}
onUserEvent (f) {
this.userEventListeners.push(f)
@@ -132,7 +132,7 @@ class AbstractConnector {
}
this.whenSyncedListeners = []
this.y.db.requestTransaction(function *() {
yield* this.store.garbageCollectAfterSync()
yield* this.garbageCollectAfterSync()
})
}
}