<s> import os <EOL> from django . conf import settings <EOL> from django . http import HttpResponse <EOL> class HttpResponseServiceUnavailable ( HttpResponse ) : <EOL> status_code = <NUM_LIT> <EOL> class TooBusyMiddleware ( object ) : <EOL> def process_request ( self , request ) : <EOL> one , five , fifteen = os . getloadavg ( ) <EOL> if one > settings . TOO_BUSY_LOAD_AVERAGE : <EOL> return HttpResponseServiceUnavailable ( """<STR_LIT>""" ) <EOL> return None </s>
