Add /health endpoint that returns last_process timestamp, fix issue #6009

This commit is contained in:
Reigo Reinmets
2022-01-23 21:58:46 +02:00
parent 451eca51c8
commit bf62fc9b25
7 changed files with 59 additions and 7 deletions

View File

@@ -100,6 +100,8 @@ class FreqtradeBot(LoggingMixin):
self._exit_lock = Lock()
LoggingMixin.__init__(self, logger, timeframe_to_seconds(self.strategy.timeframe))
self.last_process = datetime.utcfromtimestamp(0.0)
def notify_status(self, msg: str) -> None:
"""
Public method for users of this class (worker, etc.) to send notifications
@@ -187,6 +189,7 @@ class FreqtradeBot(LoggingMixin):
self.enter_positions()
Trade.commit()
self.last_process = datetime.utcnow()
def process_stopped(self) -> None:
"""