[Pkg-debile-commits] [debile-master] 122/126: Added failed flag

Sylvestre Ledru sylvestre at alioth.debian.org
Mon Aug 19 14:56:28 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 75432134a9087dd2547cf11ab8d9a900b61cbaa3
Author: Léo Cavaillé <leo at cavaille.net>
Date:   Thu Aug 8 16:34:32 2013 +0200

    Added failed flag
---
 lucy/orm.py    |    7 ++-----
 lucy/server.py |    5 +++--
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/lucy/orm.py b/lucy/orm.py
index 744bfec..ac967a8 100644
--- a/lucy/orm.py
+++ b/lucy/orm.py
@@ -3,7 +3,7 @@ from sqlalchemy.ext.declarative import declarative_base
 Base = declarative_base()
 
 from sqlalchemy.orm import relationship, backref
-from sqlalchemy import Column, Integer, String, DateTime, ForeignKey
+from sqlalchemy import Column, Integer, String, DateTime, ForeignKey, Boolean
 from sqlalchemy.dialects.postgresql import UUID
 
 import datetime as dt
@@ -112,6 +112,7 @@ class Job(Base):
     package = relationship("Package", backref=backref('jobs', order_by=id), foreign_keys=[package_id])
     arch = Column(String(20), nullable=False)
     suite = Column(String(50), nullable=False)
+    failed = Column(Boolean)
 
     def serialize(self):
         serial = row2dict(self)
@@ -124,10 +125,6 @@ class Job(Base):
             return True
         return False
 
-    def is_failed(self):
-        #TODO
-        return True
-
     def is_critical(self):
         if self.type in ['build']:
             return True
diff --git a/lucy/server.py b/lucy/server.py
index 616ca5f..94a009d 100644
--- a/lucy/server.py
+++ b/lucy/server.py
@@ -101,7 +101,7 @@ class LucyInterface(object):
         # FIXME : awful
         if not os.path.exists(path):
             os.makedirs(path)
-        path = os.path.join(path, 'log')
+        path = os.path.join(path, 'log.txt')
         # FIXME: unsafe code, we should verify if the job id exists
         return path
 
@@ -210,13 +210,14 @@ class LucyInterface(object):
     #return rid
 
     @machine_method
-    def close_job(self, job_id):
+    def close_job(self, job_id, failed):
         """
         Close a job after pushing reports / binaries up.
         """
         session = Session()
         j = session.query(Job).filter(Job.id == job_id).one()
         j.finished_at = dt.datetime.utcnow()
+        j.failed = failed
         session.commit()
         return j.serialize()
 

-- 
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