[Mpuls-commits] r1858 - in wasko/branches/2.0: . mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Feb 26 20:22:30 CET 2010


Author: bh
Date: 2010-02-26 20:22:28 +0100 (Fri, 26 Feb 2010)
New Revision: 1858

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/mpulsweb/lib/app_globals.py
Log:
* mpulsweb/lib/app_globals.py (Globals.__init__): tell paste to
restart the server if the formed files change.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-02-26 19:20:37 UTC (rev 1857)
+++ wasko/branches/2.0/ChangeLog	2010-02-26 19:22:28 UTC (rev 1858)
@@ -1,5 +1,10 @@
 2010-02-26  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/lib/app_globals.py (Globals.__init__): tell paste to
+	restart the server if the formed files change.
+
+2010-02-26  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/lib/app_globals.py (Globals.__init__): The
 	AnnotationsProvider already handles missing files gracefully, so
 	there's no need to ignore any exceptions at this point.  If the

Modified: wasko/branches/2.0/mpulsweb/lib/app_globals.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/app_globals.py	2010-02-26 19:20:37 UTC (rev 1857)
+++ wasko/branches/2.0/mpulsweb/lib/app_globals.py	2010-02-26 19:22:28 UTC (rev 1858)
@@ -27,6 +27,8 @@
 import os
 import logging
 
+from paste.reloader import watch_file
+
 from pylons import config
 
 from formed.meta.io.document import openDocument
@@ -75,6 +77,9 @@
         self.formedTree = openDocument(formed_file)
         self.helpData = AnnotationsProvider(annotation_file)
 
+        # tell paste to restart the server if the formed files change
+        watch_file(formed_file)
+        watch_file(annotation_file)
 
         # TODO: These setups should be while application intialisation, as they
         # are not related to any global vars or functions. Move to



More information about the Mpuls-commits mailing list