Skip to content

Commit

Permalink
fixed: gather obstack result file empty check retry adjustment (#594)
Browse files Browse the repository at this point in the history
  • Loading branch information
Teingi authored Dec 4, 2024
1 parent ca72d06 commit 4f8a719
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions handler/gather/gather_obstack2.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ def __handle_from_node(self, local_stored_path, node):
resp["gather_pack_path"] = "{0}/{1}.zip".format(local_stored_path, remote_dir_name)
return resp

@Util.retry(5, 2)
@Util.retry(10, 5)
def is_ready(self, ssh_client, pid, remote_dir_name):
try:
self.stdio.verbose("Check whether the directory /tmp/{dir_name} or " "file /tmp/{dir_name}/observer_{pid}_obstack.txt is empty".format(dir_name=remote_dir_name, pid=pid))
is_empty_dir_res = is_empty_dir(ssh_client, "/tmp/{0}".format(remote_dir_name), self.stdio)
is_empty_file_res = is_empty_file(ssh_client, "/tmp/{dir_name}/observer_{pid}_obstack.txt".format(dir_name=remote_dir_name, pid=pid), self.stdio)
if is_empty_dir_res or is_empty_file_res:
self.stdio.verbose(
self.stdio.warn(
"The server {host_ip} directory /tmp/{dir_name} or file /tmp/{dir_name}/observer_{pid}_obstack.txt" " is empty, waiting for the collection to complete".format(host_ip=ssh_client.get_name(), dir_name=remote_dir_name, pid=pid)
)
raise
Expand Down

0 comments on commit 4f8a719

Please sign in to comment.