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

Commit d53afce3 by Mick Hansen Committed by Jan Aagaard Meier

MySQL: Use shift() instead of array filter for queue item transfer

1 parent 1b5385ac
Showing with 4 additions and 5 deletions
......@@ -60,6 +60,7 @@ module.exports = (function() {
}
enqueue.call(this, queueItem)
//queueItem.query.run(queueItem.sql, queueItem.client)
return queueItem.query
}
......@@ -160,10 +161,9 @@ module.exports = (function() {
var transferQueuedItems = function(count) {
for(var i = 0; i < count; i++) {
var queueItem = this.queue[0]
var queueItem = this.queue.shift();
if(queueItem) {
enqueue.call(this, queueItem)
this.queue = without(this.queue, queueItem)
}
}
}
......@@ -210,6 +210,4 @@ module.exports = (function() {
}
return ConnectorManager
})()
})()
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!