Skip to content

Commit

Permalink
TECH-1204 - Adding func wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrUA committed May 11, 2023
1 parent 221b330 commit a83301a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions chief_keeper/chief_keeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@

from auction_keeper.gas import DynamicGasPrice

from functools import wraps


class ChiefKeeper:
"""Keeper that lifts the hat and streamlines executive actions"""
Expand Down Expand Up @@ -179,8 +181,9 @@ def __init__(self, args: list, **kwargs):
level=(logging.DEBUG if self.arguments.debug else logging.INFO),
)

def healthy(func):
def wrapper(self, *args, **kwargs):
def healthy(self, func):
@wraps(func)
def wrapper(*args, **kwargs):
ts = int(time.time())
self.logger.info(f"Health-check passed: {ts}")
with open(self.arguments.health_check_file_path, "w") as f:
Expand Down

0 comments on commit a83301a

Please sign in to comment.