]> www.vanbest.org Git - motioneye-debian/commitdiff
debug setting is no longer required, reloading is triggered manually
authorCalin Crisan <ccrisan@gmail.com>
Sun, 6 Jul 2014 13:01:53 +0000 (16:01 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sun, 6 Jul 2014 13:01:53 +0000 (16:01 +0300)
after update

src/server.py
src/update.py

index 57153f254533199f6655687c8f5035b5ea926a1b..70e42b41d4d11b1bade767c33af8aaf56d69a4e2 100644 (file)
@@ -51,7 +51,7 @@ application = Application(
         (r'^/update/?$', handlers.UpdateHandler),
         (r'^.*$', handlers.NotFoundHandler),
     ],
-    debug=not settings.ENABLE_REBOOT, # enables autoreload when reboot is disabled
+    debug=False,
     log_function=log_request,
     static_path=settings.STATIC_PATH,
     static_url_prefix=settings.STATIC_URL
index cbf822558eab704e8c557cf262b34cee832a5f65..b557d427ec512861a4ae97669303b4016af1fe3f 100644 (file)
@@ -225,6 +225,13 @@ def perform_update(version):
                 
             IOLoop.instance().add_timeout(datetime.timedelta(seconds=2), call_reboot)
         
+        else:
+            from tornado import autoreload
+            
+            # this will reload the interpreter
+            logging.info('reloading python interpreter...')
+            autoreload._reload()
+        
         return True
     
     except Exception as e: