diff --git a/runbot/runbot.py b/runbot/runbot.py index d261cc0e..e762e9f4 100644 --- a/runbot/runbot.py +++ b/runbot/runbot.py @@ -1234,7 +1234,10 @@ class RunbotController(http.Controller): 'filters': filters, }) - for result in build_obj.read_group(cr, uid, [], ['host'], ['host']): + # consider host gone if no build in last 100 + build_threshold = max(build_ids) - 100 + + for result in build_obj.read_group(cr, uid, [('id', '>', build_threshold)], ['host'], ['host']): if result['host']: context['host_stats'].append({ 'host': result['host'],