buildman: add job status logging to managers
This commit is contained in:
parent
ca0d2b1721
commit
ffb897dfe6
2 changed files with 5 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
import logging
|
||||
import uuid
|
||||
|
||||
from app import build_metrics
|
||||
from buildman.component.basecomponent import BaseComponent
|
||||
from buildman.component.buildcomponent import BuildComponent
|
||||
from buildman.manager.basemanager import BaseManager
|
||||
|
@ -75,6 +76,7 @@ class EnterpriseManager(BaseManager):
|
|||
|
||||
@coroutine
|
||||
def job_completed(self, build_job, job_status, build_component):
|
||||
build_metrics.report(job_status)
|
||||
self.job_complete_callback(build_job, job_status)
|
||||
|
||||
def build_component_disposed(self, build_component, timed_out):
|
||||
|
|
|
@ -10,6 +10,7 @@ from trollius import From, coroutine, Return, async
|
|||
from concurrent.futures import ThreadPoolExecutor
|
||||
from urllib3.exceptions import ReadTimeoutError, ProtocolError
|
||||
|
||||
from app import build_metrics
|
||||
from buildman.manager.basemanager import BaseManager
|
||||
from buildman.manager.executor import PopenExecutor, EC2Executor
|
||||
from buildman.component.buildcomponent import BuildComponent
|
||||
|
@ -286,6 +287,8 @@ class EphemeralBuilderManager(BaseManager):
|
|||
job_key = self._etcd_job_key(build_job)
|
||||
yield From(self._etcd_client.delete(job_key))
|
||||
|
||||
build_metrics.report(job_status)
|
||||
|
||||
self.job_complete_callback(build_job, job_status)
|
||||
|
||||
@coroutine
|
||||
|
|
Reference in a new issue