不要怂,就是干,撸起袖子干!

Commit 64c7536b by Dmitry Chornyi

Fixed whitespace

1 parent 7d5e5210
Showing with 7 additions and 11 deletions
...@@ -411,35 +411,31 @@ module.exports = (function() { ...@@ -411,35 +411,31 @@ module.exports = (function() {
queueItem.query.client = connection queueItem.query.client = connection
queueItem.client = connection queueItem.client = connection
queueItem.query queueItem.query
.success(function () { .success(function(){ afterQuery.call(self, queueItem) })
afterQuery.call(self, queueItem) .error(function(){ afterQuery.call(self, queueItem) })
})
.error(function () {
afterQuery.call(self, queueItem)
})
queueItem.query.run(queueItem.sql, queueItem.client) queueItem.query.run(queueItem.sql, queueItem.client)
}) })
} }
ConnectorManager.prototype.__defineGetter__('hasQueuedItems', function () { ConnectorManager.prototype.__defineGetter__('hasQueuedItems', function() {
return (this.queue.length > 0) || (this.activeQueue.length > 0) || (this.client && this.client._queue && (this.client._queue.length > 0)) return (this.queue.length > 0) || (this.activeQueue.length > 0) || (this.client && this.client._queue && (this.client._queue.length > 0))
}) })
// legacy // legacy
ConnectorManager.prototype.__defineGetter__('hasNoConnections', function () { ConnectorManager.prototype.__defineGetter__('hasNoConnections', function() {
return !this.hasQueuedItems return !this.hasQueuedItems
}) })
ConnectorManager.prototype.__defineGetter__('isConnected', function () { ConnectorManager.prototype.__defineGetter__('isConnected', function() {
return this.client != null return this.client != null
}) })
var disconnectIfNoConnections = function () { var disconnectIfNoConnections = function() {
var self = this var self = this
this.disconnectTimeoutId && clearTimeout(this.disconnectTimeoutId) this.disconnectTimeoutId && clearTimeout(this.disconnectTimeoutId)
this.disconnectTimeoutId = setTimeout(function () { this.disconnectTimeoutId = setTimeout(function() {
self.isConnected && !self.hasQueuedItems && self.disconnect() self.isConnected && !self.hasQueuedItems && self.disconnect()
}, 100) }, 100)
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!