[Pkg-debile-commits] [debile-master] 06/126: split out job close
Sylvestre Ledru
sylvestre at alioth.debian.org
Mon Aug 19 14:56:05 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 6c4416c327f12d6116185035c5eaa017f46a88b3
Author: Paul Tagliamonte <tag at pault.ag>
Date: Tue May 21 15:23:50 2013 -0400
split out job close
---
lucy/server.py | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/lucy/server.py b/lucy/server.py
index 5292b8e..39f3ae3 100644
--- a/lucy/server.py
+++ b/lucy/server.py
@@ -65,7 +65,7 @@ class LucyInterface(object):
def submit_report(self, job, report):
job = Job.load(job)
if job.is_finished():
- raise ValueError("Job has already been submited")
+ raise ValueError("Job is finished")
builder = job.get_builder()
builder = builder['_id'] if builder else None
@@ -77,11 +77,15 @@ class LucyInterface(object):
job=job['_id'],
report=report,
package=job['package'])
- report = r.save()
+ return r.save()
+
+ def close_job(self, job):
+ job = Job.load(job)
+ if job.is_finished():
+ raise ValueError("job is already closed")
job['finished_at'] = dt.datetime.utcnow()
- job.save()
- return report
+ return job.save()
def serve(server, port):
--
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