mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Let's try this without the request timeout middleware, to see if we still need that.
This commit is contained in:
parent
f2f8c00c6b
commit
967d6cd889
1 changed files with 9 additions and 8 deletions
|
@ -11,13 +11,14 @@ logging = require './server/commons/logging'
|
||||||
config = require './server_config'
|
config = require './server_config'
|
||||||
|
|
||||||
###Middleware setup functions implementation###
|
###Middleware setup functions implementation###
|
||||||
setupRequestTimeoutMiddleware = (app) ->
|
# 2014-03-03: Try not using this and see if it's still a problem
|
||||||
app.use (req, res, next) ->
|
#setupRequestTimeoutMiddleware = (app) ->
|
||||||
req.setTimeout 15000, ->
|
# app.use (req, res, next) ->
|
||||||
console.log 'timed out!'
|
# req.setTimeout 15000, ->
|
||||||
req.abort()
|
# console.log 'timed out!'
|
||||||
self.emit('pass',message)
|
# req.abort()
|
||||||
next()
|
# self.emit('pass',message)
|
||||||
|
# next()
|
||||||
|
|
||||||
productionLogging = (tokens, req, res)->
|
productionLogging = (tokens, req, res)->
|
||||||
status = res.statusCode
|
status = res.statusCode
|
||||||
|
@ -32,7 +33,7 @@ productionLogging = (tokens, req, res)->
|
||||||
null
|
null
|
||||||
|
|
||||||
setupExpressMiddleware = (app) ->
|
setupExpressMiddleware = (app) ->
|
||||||
setupRequestTimeoutMiddleware app
|
#setupRequestTimeoutMiddleware app
|
||||||
if config.isProduction
|
if config.isProduction
|
||||||
express.logger.format('prod', productionLogging)
|
express.logger.format('prod', productionLogging)
|
||||||
app.use(express.logger('prod'))
|
app.use(express.logger('prod'))
|
||||||
|
|
Loading…
Reference in a new issue