[Pkg-debile-commits] [debile-master] 74/126: tweaking about
Sylvestre Ledru
sylvestre at alioth.debian.org
Mon Aug 19 14:56:18 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 627f7ce69a644079e51ab5b381157d0a446cb316
Author: Paul Tagliamonte <tag at pault.ag>
Date: Sun Jun 9 15:20:08 2013 -0400
tweaking about
---
lucy/models/job.py | 3 ++-
lucy/models/machine.py | 8 ++++++++
lucy/models/source.py | 3 ++-
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/lucy/models/job.py b/lucy/models/job.py
index 0ca4adf..ee7cec7 100644
--- a/lucy/models/job.py
+++ b/lucy/models/job.py
@@ -110,9 +110,10 @@ class Job(LucyObject):
@classmethod
def unfinished_jobs(cls, **kwargs):
- k = kwargs.copy()
+ k = {}
k.update({"finished_at": None,
"builder": {"$ne": None}})
+ k.update(kwargs.copy())
return cls.query(k)
diff --git a/lucy/models/machine.py b/lucy/models/machine.py
index 7bf7e2f..624ee79 100644
--- a/lucy/models/machine.py
+++ b/lucy/models/machine.py
@@ -28,3 +28,11 @@ class Machine(LucyObject):
def ping(self):
self['last_ping'] = dt.datetime.utcnow()
self.save()
+
+ def get_jobs(self):
+ from lucy.models.job import Job
+ return Job.assigned_jobs(self['_id'])
+
+ @classmethod
+ def get_builders(cls):
+ return cls.query({})
diff --git a/lucy/models/source.py b/lucy/models/source.py
index 8be1b11..fa5a508 100644
--- a/lucy/models/source.py
+++ b/lucy/models/source.py
@@ -7,10 +7,11 @@ import lucy.core
class Source(LucyObject):
_type = 'sources'
- def __init__(self, source, version, owner, dsc, **kwargs):
+ def __init__(self, source, version, owner, dsc, group=None, **kwargs):
owner = User.load(owner)['_id']
super(Source, self).__init__(source=source,
version=version,
+ group=group,
owner=owner,
dsc=dsc,
**kwargs)
--
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