[SCM] live-studio branch, master, updated. be51da814fb12d25dce46a7f078a46f5c89bd777
Chris Lamb
lamby at debian.org
Fri Jul 30 02:52:35 UTC 2010
The following commit has been merged in the master branch:
commit fa30e05809b5ac9c4f6641add2a12b90f7db4ca9
Author: Chris Lamb <lamby at debian.org>
Date: Thu Jul 29 16:06:59 2010 -0400
Rudimentary support for building.
Signed-off-by: Chris Lamb <lamby at debian.org>
diff --git a/live_studio/queue/management/commands/queue_runner.py b/live_studio/queue/management/commands/queue_runner.py
index 58d7574..c1bdd39 100644
--- a/live_studio/queue/management/commands/queue_runner.py
+++ b/live_studio/queue/management/commands/queue_runner.py
@@ -1,9 +1,12 @@
+import os
+import sys
import time
import shutil
import logging
import datetime
import tempfile
import traceback
+import subprocess
from django.core.management.base import NoArgsCommand
@@ -39,13 +42,23 @@ class Command(NoArgsCommand):
self.log.exception("Entry #%d failed", entry.pk)
continue
finally:
- shutil.rmtree(tempdir)
+ self.clean(tempdir)
self.log.info("Finished processing #%d", entry.pk)
except IndexError:
self.log.debug('No items in queue, sleeping for 2s')
- time.sleep(2)
+
+ try:
+ time.sleep(2)
+ except KeyboardInterrupt:
+ sys.exit(1)
def handle_entry(self, entry, tempdir):
- # Process 'entry' here
- pass
+ os.chdir(tempdir)
+ subprocess.check_call(('lh', 'config') + entry.config.options())
+ subprocess.check_call(('lh', 'build'))
+
+ def clean(self, tempdir):
+ os.chdir(tempdir)
+ subprocess.call(('lh', 'clean', '--purge'))
+ shutil.rmtree(tempdir)
--
live-studio
More information about the debian-live-changes
mailing list