Skip to content

Commit

Permalink
Enable metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
yukonet committed Aug 1, 2024
1 parent 967b76f commit 6b2a74e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions shkeeper/modules/classes/bnb.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,4 @@ def getstatus(self):
return "Sync In Progress (%d blocks behind)" % (delta // block_interval)

except Exception as e:
return "Offline"

def metrics(self): return ''
return "Offline"
5 changes: 4 additions & 1 deletion shkeeper/modules/classes/ethereum.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ def multipayout(self, payout_list):
return response

def metrics(self):
return requests.get(f'http://{self.gethost()}/metrics', auth=self.get_auth_creds()).text
try:
return requests.get(f'http://{self.gethost()}/metrics', auth=self.get_auth_creds()).text
except Exception as e:
return {'error': e}

def get_all_addresses(self):
response = requests.post(
Expand Down
3 changes: 0 additions & 3 deletions shkeeper/modules/classes/xrp.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,3 @@ def getstatus(self):

except Exception as e:
return "Offline"


def metrics(self): return ''

0 comments on commit 6b2a74e

Please sign in to comment.