[Checkins] SVN: zc.recipe.rhrc/trunk/ Fixed: Processes weren't started on update.

jim cvs-admin at zope.org
Fri Aug 31 21:18:32 UTC 2012


Log message for revision 127668:
  Fixed: Processes weren't started on update.
  
  In a perfect world, this wouldn't be necessary, as in the
         update case, the process would already be running, however,
         it's helpful to make sure the process is running by trying to
         start it.
  

Changed:
  U   zc.recipe.rhrc/trunk/README.txt
  U   zc.recipe.rhrc/trunk/src/zc/recipe/rhrc/README.txt
  U   zc.recipe.rhrc/trunk/src/zc/recipe/rhrc/__init__.py

-=-
Modified: zc.recipe.rhrc/trunk/README.txt
===================================================================
--- zc.recipe.rhrc/trunk/README.txt	2012-08-31 20:23:40 UTC (rev 127667)
+++ zc.recipe.rhrc/trunk/README.txt	2012-08-31 21:18:28 UTC (rev 127668)
@@ -10,6 +10,16 @@
 Changes
 *******
 
+1.4.1 (2012-08-31)
+==================
+
+Fixed: Processes weren't started on update.
+
+       In a perfect world, this wouldn't be necessary, as in the
+       update case, the process would already be running, however,
+       it's helpful to make sure the process is running by trying to
+       start it.
+
 1.4.0 (2012-05-18)
 ==================
 

Modified: zc.recipe.rhrc/trunk/src/zc/recipe/rhrc/README.txt
===================================================================
--- zc.recipe.rhrc/trunk/src/zc/recipe/rhrc/README.txt	2012-08-31 20:23:40 UTC (rev 127667)
+++ zc.recipe.rhrc/trunk/src/zc/recipe/rhrc/README.txt	2012-08-31 21:18:28 UTC (rev 127668)
@@ -807,10 +807,48 @@
     ... run-script = echo zope
     ... """ % dict(dest=demo))
 
+When the part is installed, the process is started:
+
     >>> print system('bin/buildout'),
     Installing zoperc.
     zope start
 
+It also gets started when the part updates. This is just to make sure
+it is running.
+
+    >>> print system('bin/buildout'),
+    Updating zoperc.
+    zope start
+
+If we update the part, then when the part is uninstalled and
+reinstalled, the process will be stopped and started.  We'll often
+force this adding a digest option that exists solely to force a
+reinstall, typically because something else in the buildout has
+changed.
+
+    >>> write('buildout.cfg',
+    ... """
+    ... [buildout]
+    ... parts = zoperc
+    ...
+    ... [zoperc]
+    ... recipe = zc.recipe.rhrc
+    ... parts = zope
+    ... dest = %(dest)s
+    ... process-management = true
+    ... digest = 1
+    ...
+    ... [zope]
+    ... run-script = echo zope
+    ... """ % dict(dest=demo))
+
+    >>> print system('bin/buildout'),
+    Uninstalling zoperc.
+    Running uninstall recipe.
+    zope stop
+    Installing zoperc.
+    zope start
+
     >>> print system('bin/buildout buildout:parts='),
     Uninstalling zoperc.
     Running uninstall recipe.

Modified: zc.recipe.rhrc/trunk/src/zc/recipe/rhrc/__init__.py
===================================================================
--- zc.recipe.rhrc/trunk/src/zc/recipe/rhrc/__init__.py	2012-08-31 20:23:40 UTC (rev 127667)
+++ zc.recipe.rhrc/trunk/src/zc/recipe/rhrc/__init__.py	2012-08-31 21:18:28 UTC (rev 127668)
@@ -178,8 +178,7 @@
         if start and subprocess.call([ctlpath, 'start']):
             raise RuntimeError("%s start failed" % ctlpath)
 
-    def update(self):
-        pass
+    update = install
 
 def uninstall(name, options):
     name = options.get('deployment-name', name)



More information about the checkins mailing list