file_manager: log metadata response in real time

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2023-07-09 11:08:05 -04:00
parent e6b32cabbe
commit c3c3170451
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
1 changed files with 5 additions and 3 deletions

View File

@ -2468,9 +2468,11 @@ class MetadataStorage:
if self.enable_object_proc: if self.enable_object_proc:
timeout = 300. timeout = 300.
cmd += " --check-objects" cmd += " --check-objects"
shell_cmd: SCMDComp = self.server.lookup_component('shell_command') result = bytearray()
scmd = shell_cmd.build_shell_command(cmd, log_stderr=True) sc: SCMDComp = self.server.lookup_component('shell_command')
result = await scmd.run_with_response(timeout=timeout) scmd = sc.build_shell_command(cmd, callback=result.extend, log_stderr=True)
if not await scmd.run(timeout=timeout):
raise self.server.error("Extract Metadata returned with error")
try: try:
decoded_resp: Dict[str, Any] = json.loads(result.strip()) decoded_resp: Dict[str, Any] = json.loads(result.strip())
except Exception: except Exception: