Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBurchLog committed Jul 15, 2024
1 parent 010a3c5 commit 36f423c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions brewtils/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,10 +455,12 @@ def __init__(self, heartbeat=None, history=None):
def set_status_heartbeat(self, status, max_history=None):

self.heartbeat = datetime.utcnow()
self.history.append(StatusHistory(status=copy.deepcopy(status), heartbeat=self.heartbeat))
self.history.append(
StatusHistory(status=copy.deepcopy(status), heartbeat=self.heartbeat)
)

if max_history and max_history > 0 and len(self.history) > max_history:
self.history = self.history[(max_history * -1):]
self.history = self.history[(max_history * -1) :]

def __str__(self):
return self.heartbeat
Expand Down

0 comments on commit 36f423c

Please sign in to comment.