Skip to content

Commit

Permalink
adding requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kchilleri committed Oct 8, 2024
1 parent 700ed6a commit 15bc9bd
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion beeflow/client/bee_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def check_hostname(curr_hn, stop=False):
"""Check current front end name matches the one beeflow was started on."""
db = bdb.connect_db(client_db, db_path())
start_hn = db.info.get_hostname()
if start_hn != "" and curr_hn != start_hn: # noqa: don't use set instead
if start_hn and curr_hn != start_hn: # noqa: don't use set instead
warn(f'beeflow was started on "{start_hn}" and you are trying to '
f'run a command on "{curr_hn}".')
if start_hn == "":
Expand Down
3 changes: 0 additions & 3 deletions beeflow/client/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,9 +432,6 @@ def status():
status_hn = socket.gethostname() # hostname when beeflow core status returned
resp = cli_connection.send(paths.beeflow_socket(), {'type': 'status'})
if resp is None:
beeflow_log = paths.log_fname('beeflow')
warn('Cannot connect to the beeflow daemon, is it running? Check the '
f'log at "{beeflow_log}".')
bee_client.check_hostname(status_hn)
sys.exit(1)
print('beeflow components:')
Expand Down
7 changes: 0 additions & 7 deletions beeflow/common/db/client_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ def get_hostname(self):
hostname = result
return hostname

def get_info(self):
"""Return an info object containing port information."""
stmt = "SELECT * FROM info"
result = bdb.getone(self.db_file, stmt)
info = self.Info(*result)
return info


class ClientDB:
"""Client database."""
Expand Down

0 comments on commit 15bc9bd

Please sign in to comment.