From e6ee3d50bab58dc13333180c4253ce8fbef83b13 Mon Sep 17 00:00:00 2001 From: Arjun Singh Date: Wed, 25 Jul 2012 13:39:30 -0400 Subject: [PATCH] Simplified server restart to just touching lms/__init__.py rather than killing and restarting the server. --- run_watch_data.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/run_watch_data.py b/run_watch_data.py index eea721e4be..895522a19c 100755 --- a/run_watch_data.py +++ b/run_watch_data.py @@ -33,10 +33,7 @@ class DjangoEventHandler(FileSystemEventHandler): for extension in EXTENSIONS: if event.src_path.endswith(extension) or extension == "*": print "%s changed: restarting server." % event.src_path - self.process.terminate() - os.system("ps aux | grep 'django' | grep -v grep | awk '{print $2}' | xargs kill") - time.sleep(0.25) - self.process = Popen(['rake', 'lms']) + os.system("touch lms/__init__.py") break if __name__ == "__main__":