Merge "Enhance logging of status_get requests"

This commit is contained in:
Zuul 2021-02-27 02:24:18 +00:00 committed by Gerrit Code Review
commit e65ae79d46
1 changed files with 5 additions and 0 deletions

View File

@ -377,7 +377,12 @@ class RPCListener(RPCListenerBase):
def handle_status_get(self, job):
args = json.loads(job.arguments)
start = time.monotonic()
output = self.sched.formatStatusJSON(args.get("tenant"))
end = time.monotonic()
self.log.debug('Formatting tenant %s status took %.3f seconds for '
'%d bytes', args.get("tenant"), end - start,
len(output))
job.sendWorkComplete(output)
def handle_job_get(self, gear_job):