Skip to content

Commit

Permalink
squash. Tweaks to python scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn committed Oct 18, 2024
1 parent 53e38d3 commit 76f8d32
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 12 additions & 1 deletion scripts/irods/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ def get_binary_to_procs_dict(self, server_proc, server_descendants=None, binarie
d[b] = procs
return d

# TODO Need one of these for shutdown.
def wait_for_server_startup_to_complete(self, max_retries=100):
try_count = 1

Expand All @@ -278,6 +277,18 @@ def wait_for_server_startup_to_complete(self, max_retries=100):
try_count += 1
time.sleep(1)

def wait_for_server_shutdown_to_complete(self, max_retries=100):
for _ in range(max_retries):
l.debug('Waiting for iRODS server to shut down. Attempt #%s', try_count)
try:
os.kill(self.get_server_pid(), 0)
continue
except:
pass
time.sleep(1)

raise IrodsError('iRODS server failed to start.')

def binary_matches(binary_path, proc):
if proc.is_running():
try:
Expand Down
2 changes: 2 additions & 0 deletions scripts/irods/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ def _icommands_test_directory():
_icommands_test_directory_cache = _irods_directory() / 'clients' / 'icommands' / 'test'
return _icommands_test_directory_cache

# TODO Nothing appears to use this or the functions which this is built upon.
def icommands_test_directory():
return str(_icommands_test_directory())

Expand All @@ -360,6 +361,7 @@ def _server_test_directory():
_server_test_directory_cache = _irods_directory() / 'test' / 'bin'
return _server_test_directory_cache

# TODO Nothing appears to use this or the functions which this is built upon.
def server_test_directory():
return str(_server_test_directory())

Expand Down

0 comments on commit 76f8d32

Please sign in to comment.