Since we are about to release it's time to finally fix our linting. This patch basically runs eslint --fix and does some further manual fixes. Also it sets up eslint to fail on every warning on order to make warnings visable in the CI process. There should no functional change be introduced. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
		
			
				
	
	
		
			17 lines
		
	
	
		
			305 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			305 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 'use strict'
 | |
| 
 | |
| const toobusy = require('toobusy-js')
 | |
| 
 | |
| const response = require('../../response')
 | |
| const config = require('../../config')
 | |
| 
 | |
| toobusy.maxLag(config.tooBusyLag)
 | |
| 
 | |
| module.exports = function (req, res, next) {
 | |
|   if (toobusy()) {
 | |
|     response.errorServiceUnavailable(res)
 | |
|   } else {
 | |
|     next()
 | |
|   }
 | |
| }
 |