[Pkg-debile-commits] [debile-master] 40/126: meh

Sylvestre Ledru sylvestre at alioth.debian.org
Mon Aug 19 14:56:11 UTC 2013


This is an automated email from the git hooks/post-receive script.

sylvestre pushed a commit to branch scan-build-html
in repository debile-master.

commit 2bfe7e4e4a3eaa85750a03464ca5c2ae388dea34
Author: Paul Tagliamonte <tag at pault.ag>
Date:   Tue May 28 22:56:07 2013 -0400

    meh
---
 lucy/models/job.py |    3 ++-
 lucy/server.py     |    8 +++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/lucy/models/job.py b/lucy/models/job.py
index 25fa43b..3ee9954 100644
--- a/lucy/models/job.py
+++ b/lucy/models/job.py
@@ -52,10 +52,11 @@ class Job(LucyObject):
             yield x
 
     @classmethod
-    def next_job(cls, suites, arches, **kwargs):
+    def next_job(cls, suites, arches, types, **kwargs):
         k = kwargs.copy()
         k.update({"builder": None,
                   "finished_at": None,
+                  "type": {"$in": types},
                   "suite": {"$in": suites},
                   "arch": {"$in": arches}})
         v = cls.single(k)
diff --git a/lucy/server.py b/lucy/server.py
index 445c3be..fc25519 100644
--- a/lucy/server.py
+++ b/lucy/server.py
@@ -73,13 +73,15 @@ class LucyInterface(object):
         """
         return list(Job.assigned_jobs(get_builder_id()))
 
-    def get_next_job(self, suites, arches):
+    def get_next_job(self, suites, arches, types):
         """
         Get an unassigned lint job from suite suites, arches arches
         """
-        nj = Job.next_job(suites, arches)
-        if nj is None:
+        try:
+            nj = Job.next_job(suites, arches, types)
+        except KeyError:
             return None
+
         nj['assigned_at'] = dt.datetime.utcnow()
         nj['builder'] = get_builder_id()
         nj.save()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-master.git



More information about the Pkg-debile-commits mailing list