Skip to content

Commit 119b1e8

Browse files
committed
Merge pull request #353 from Martii/removeToobusy-js
Remove package toobusy-js Auto-merge
2 parents f74df2c + 9fc3ddd commit 119b1e8

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ Repository | Reference | Recent Version
5555
[request][requestGHUrl] | [Documentation][requestDOCUrl] | [![NPM version][requestNPMVersionImage]][requestNPMUrl]
5656
[sanitize-html][sanitize-htmlGHUrl] | [Documentation][sanitize-htmlDOCUrl] | [![NPM version][sanitize-htmlNPMVersionImage]][sanitize-htmlNPMUrl]
5757
[select2][select2GHUrl] | [Documentation][select2DOCUrl] | [![NPM version][select2NPMVersionImage]][select2NPMUrl]
58-
[toobusy-js][toobusy-jsGHUrl] | [Documentation][toobusy-jsDOCUrl] | [![NPM version][toobusy-jsNPMVersionImage]][toobusy-jsNPMUrl]
5958
[underscore][underscoreGHUrl] | [Documentation][underscoreDOCUrl] | [![NPM version][underscoreNPMVersionImage]][underscoreNPMUrl]
6059

6160

@@ -240,11 +239,6 @@ Repository | Reference | Recent Version | Referenced
240239
[sanitize-htmlNPMUrl]: https://npmjs.org/package/sanitize-html
241240
[sanitize-htmlNPMVersionImage]: https://img.shields.io/npm/v/sanitize-html.svg?style=flat
242241

243-
[toobusy-jsGHUrl]: https://github.com/STRML/node-toobusy
244-
[toobusy-jsDOCUrl]: https://github.com/STRML/node-toobusy/blob/master/README.md
245-
[toobusy-jsNPMUrl]: https://npmjs.org/package/toobusy-js
246-
[toobusy-jsNPMVersionImage]: https://img.shields.io/npm/v/toobusy-js.svg?style=flat
247-
248242
[underscoreGHUrl]: https://github.com/jashkenas/underscore
249243
[underscoreDOCUrl]: http://underscorejs.org/
250244
[underscoreNPMUrl]: https://npmjs.org/package/underscore

app.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use strict';
22

3-
var toobusy = require('toobusy-js');
43
var express = require('express');
54
var minify = require('express-minify');
65
var MongoStore = require('connect-mongo')(express);
@@ -30,20 +29,6 @@ db.once('open', function () {
3029

3130
var sessionStore = new MongoStore({ mongoose_connection: db });
3231

33-
// See https://hacks.mozilla.org/2013/01/building-a-node-js-server-that-wont-melt-a-node-js-holiday-season-part-5/
34-
app.use(function (aReq, aRes, aNext) {
35-
// check if we're toobusy
36-
toobusy.maxLag(100);
37-
if (toobusy()) {
38-
statusCodePage(aReq, aRes, aNext, {
39-
statusCode: 503,
40-
statusMessage: 'We\'re busy right now. Try again later.',
41-
});
42-
} else {
43-
aNext();
44-
}
45-
});
46-
4732
// Force HTTPS
4833
if (app.get('port') === 443) {
4934
app.use(function (aReq, aRes, aNext) {

0 commit comments

Comments
 (0)