[SCM] live-studio branch, master, updated. fac82d3eaf15597b01b731d451a0b25b992af870

Chris Lamb lamby at debian.org
Fri Jul 30 23:47:51 UTC 2010


The following commit has been merged in the master branch:
commit fac82d3eaf15597b01b731d451a0b25b992af870
Author: Chris Lamb <lamby at debian.org>
Date:   Fri Jul 30 19:46:28 2010 -0400

    Write a real pidfile to the location specified so that stop initscript action works

diff --git a/live_studio/build/management/commands/queue_runner.py b/live_studio/build/management/commands/queue_runner.py
index 1cdc25d..a2975fe 100644
--- a/live_studio/build/management/commands/queue_runner.py
+++ b/live_studio/build/management/commands/queue_runner.py
@@ -8,9 +8,10 @@ import shutil
 import logging
 import datetime
 import tempfile
-import lockfile
 import subprocess
 
+from daemon import pidlockfile
+
 from django.conf import settings
 from django.core.management.base import NoArgsCommand, make_option
 
@@ -28,14 +29,11 @@ class Command(NoArgsCommand):
     )
 
     def handle_noargs(self, **options):
-        if not options['pidfile']:
-            self.run(options)
-            return
-
-        pidfile = lockfile.FileLock(options['pidfile'])
+        if options['pidfile']:
+            pidfile = pidlockfile.PIDLockFile(options['pidfile'])
+            daemon.DaemonContext(pidfile=pidfile).open()
 
-        with daemon.DaemonContext(pidfile=pidfile):
-            self.run(options)
+        self.run(options)
 
     def run(self, options):
         logging.basicConfig(level=logging.INFO)

-- 
live-studio



More information about the debian-live-changes mailing list