node-inspector

This commit is contained in:
Kevin Jahns
2015-09-10 19:41:07 +02:00
parent b9e21665e2
commit 4bfe484fc2
18 changed files with 309 additions and 217 deletions

View File

@@ -1,4 +1,5 @@
/* @flow */
'use strict'
function Y (opts) {
var def = Promise.defer()
@@ -35,10 +36,13 @@ class YConfig { // eslint-disable-line no-unused-vars
disconnect () {
this.connector.disconnect()
}
async reconnect () {
await this.db.garbageCollect()
await this.db.garbageCollect()
this.connector.reconnect()
reconnect () {
Promise.all([
this.db.garbageCollect(),
this.db.garbageCollect()
]).then(function () {
this.connector.reconnect()
})
}
destroy () {
this.connector.disconnect()
@@ -50,3 +54,5 @@ class YConfig { // eslint-disable-line no-unused-vars
}
}
}
if (g) g.Y = Y //eslint-disable-line