Skip to content

Commit

Permalink
add requested changes: clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
kchilleri committed Jan 3, 2025
1 parent b6912b1 commit 9751e56
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions beeflow/client/bee_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,11 @@ def check_backend_jobs(start_hn, command=False):
# iterate through available nodes
data = resp.stdout.splitlines()
cur_alloc = False
for node in data:
if node == get_hostname():
cur_alloc = True
if get_hostname() in data:
cur_alloc = True

if cur_alloc is True:
if command is True:
if cur_alloc:
if command:
warn(f'beeflow was started on "{get_hostname()}" and you are trying to '
f'run a command on "{start_hn}".')
sys.exit(1)
Expand All @@ -122,7 +121,7 @@ def check_backend_jobs(start_hn, command=False):
'and it is still running. ')
sys.exit(1)
else: # beeflow was started on compute node but user no longer owns node
if command is True:
if command:
warn('beeflow has not been started!')
sys.exit(1)
else:
Expand Down

0 comments on commit 9751e56

Please sign in to comment.