mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot: compute build time and don't copy from previous build
Before this commit, the job_end was always None because of a time2str function with no return. So the job_time was the same as the job age. Also, the result and times were copied from the prvious build. Displayed time and results were wrong.
This commit is contained in:
parent
1543c8d0d8
commit
e9a292373f
@ -22,7 +22,7 @@ def fqdn():
|
||||
|
||||
|
||||
def time2str(t):
|
||||
time.strftime(DEFAULT_SERVER_DATETIME_FORMAT, t)
|
||||
return time.strftime(DEFAULT_SERVER_DATETIME_FORMAT, t)
|
||||
|
||||
|
||||
def dt2time(datetime):
|
||||
|
@ -41,15 +41,15 @@ class runbot_build(models.Model):
|
||||
subject = fields.Text('Subject')
|
||||
sequence = fields.Integer('Sequence')
|
||||
modules = fields.Char("Modules to Install")
|
||||
result = fields.Char('Result', default='') # ok, ko, warn, skipped, killed, manually_killed
|
||||
result = fields.Char('Result', default='', copy=False) # ok, ko, warn, skipped, killed, manually_killed
|
||||
guess_result = fields.Char(compute='_guess_result')
|
||||
pid = fields.Integer('Pid')
|
||||
state = fields.Char('Status', default='pending') # pending, testing, running, done, duplicate, deathrow
|
||||
job = fields.Char('Job') # job_*
|
||||
job_start = fields.Datetime('Job start')
|
||||
job_end = fields.Datetime('Job end')
|
||||
job_time = fields.Integer(compute='_get_time', string='Job time')
|
||||
job_age = fields.Integer(compute='_get_age', string='Job age')
|
||||
job_start = fields.Datetime('Job start', copy=False)
|
||||
job_end = fields.Datetime('Job end', copy=False)
|
||||
job_time = fields.Integer(compute='_get_time', string='Job time', copy=False)
|
||||
job_age = fields.Integer(compute='_get_age', string='Job age', copy=False)
|
||||
duplicate_id = fields.Many2one('runbot.build', 'Corresponding Build')
|
||||
server_match = fields.Selection([('builtin', 'This branch includes Odoo server'),
|
||||
('exact', 'branch/PR exact name'),
|
||||
|
Loading…
Reference in New Issue
Block a user