[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 98a02cb08aa3a8a19992bc941bbddfe1c6a7c3c0
Author: Chris Lamb <lamby at debian.org>
Date: Thu Jul 29 11:09:51 2010 -0400
Expand queue_runner a bit more.
Signed-off-by: Chris Lamb <lamby at debian.org>
diff --git a/live_studio_www/queue/management/commands/queue_runner.py b/live_studio_www/queue/management/commands/queue_runner.py
index 7f779a2..88b1c5f 100644
--- a/live_studio_www/queue/management/commands/queue_runner.py
+++ b/live_studio_www/queue/management/commands/queue_runner.py
@@ -1,5 +1,21 @@
+import time
+
from django.core.management.base import NoArgsCommand
+from live_studio_www.queue.models import Entry
+
class Command(NoArgsCommand):
def handle_noargs(self, **options):
self.verbose = int(options['verbosity']) > 1
+
+ while True:
+ try:
+ # Pop
+ entry = Entry.objects.all()[0]
+ self.handle_entry(entry)
+ except IndexError:
+ time.sleep(2)
+
+ def handle_entry(self, entry):
+ # Process 'entry' here
+ pass
--
live-studio
More information about the debian-live-changes
mailing list