Skip to content

Commit

Permalink
Merge pull request lighterio#36 from zerious/master
Browse files Browse the repository at this point in the history
Added logging for queued requests being run
  • Loading branch information
zerious committed Nov 4, 2014
2 parents 6a72bcc + 4a3ae19 commit 08c9f0f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions lib/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,14 @@ module.exports = Class.extend({
app.server.use(queuer);
app.when('loaded', function () {
app.server.unuse(queuer);
queue.forEach(function (next) {
next();
});
var l = queue.length;
if (l) {
for (var i = 0; i < l; i++) {
queue[i]();
}
app.logger.log('[Lighter] Handled ' + l + ' queued request' + (l > 1 ? 's' : '') + '.');
}
queue.length = 0;
});
}
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "lighter",
"version": "0.2.1",
"version": "0.2.2",
"description": "A lightweight Node.js framework",
"dependencies": {
"beams": "^0.0.16",
"cedar": "^0.1.1",
"cedar": "^0.1.2",
"chug": "^0.2.1",
"d6": "^0.1.7",
"jymin": "^0.3.5",
Expand Down

0 comments on commit 08c9f0f

Please sign in to comment.