else:
return datetime.datetime.utcnow() - self.started_at
- @property
- def message_recipients(self):
- l = []
-
- # Add all people watching the build.
- l += self.build.message_recipients
-
- # Add the package maintainer on release builds.
- if self.build.type == "release":
- maint = self.pkg.maintainer
-
- if isinstance(maint, users.User):
- l.append("%s <%s>" % (maint.realname, maint.email))
- elif maint:
- l.append(maint)
-
- # XXX add committer and commit author.
-
- # Add the owner of the scratch build on scratch builds.
- elif self.build.type == "scratch" and self.build.user:
- l.append("%s <%s>" % \
- (self.build.user.realname, self.build.user.email))
-
- return set(l)
-
def save_buildroot(self, pkgs):
# Cleanup old stuff first (for rebuilding packages)
self.db.execute("DELETE FROM jobs_buildroots WHERE job_id = %s", self.id)