Alessio Deiana  committed c6206aa

Removes local config file

It does not make much sense anymore when used in a virtal environment.

  • Participants
  • Parent commits f8118b3
  • Branches master

Comments (0)

Files changed (2)

File src/invenio_devserver/

 CONFIG_FILENAME = 'invenio.conf'
 LOCAL_CONFIG_FILENAME = 'invenio-local.conf'
-# Print a warning after xx seconds when processing a request
-# Spawns a server that will accept connections to be able to
-# run arbitrary python code on the work
-    import config_local
-    for setting in dir(config_local):
-        if setting == setting.upper():
-            globals()[setting] = getattr(config_local, setting)
-except ImportError:
-    pass

File src/invenio_devserver/

     signal.signal(signal.SIGUSR1, print_traceback)
     # Hook debugging console
-    if config.USE_CONSOLE or options.use_console:
+    if options.use_console:
         from rfoo.utils import rconsole
     def timed_out_request(f, *args, **kwargs):
         def cb_handler(signum, frame):
             _log('info', "\033[01;31mYour request took more than %s"
-                         " seconds to process\033[0m" % config.REQUEST_TIMEOUT)
+                         " seconds to process\033[0m" % options.request_timeout)
         signal.signal(signal.SIGALRM, cb_handler)
-        signal.alarm(config.REQUEST_TIMEOUT)
+        signal.alarm(options.request_timeout)
             return f(*args, **kwargs)
-    if config.REQUEST_TIMEOUT:
+    if options.request_timeout:
         wsgi_app = partial(timed_out_request, wsgi_app)
                       default=False, help='Ability to open a remote console on worker')
     parser.add_option('--single-threaded', action='store_true', dest='single_threaded',
                       default=False, help='Disable http server threading')
+    parser.add_option('--request-timeout', action='store_true', dest='request_timeout',
+                      default=False, help='Display a message if a request lasts more than n seconds')
     return parser.parse_args()