diff --git a/chloresolve/chloresolve/__init__.py b/chloresolve/chloresolve/__init__.py index 4fbec27..033ecf0 100644 --- a/chloresolve/chloresolve/__init__.py +++ b/chloresolve/chloresolve/__init__.py @@ -1 +1 @@ -__version__ = "1.4.1+rev72" +__version__ = "1.4.1+rev73" diff --git a/chloresolve/chloresolve/uptime_pinging.py b/chloresolve/chloresolve/uptime_pinging.py index f9af019..3a03fe8 100644 --- a/chloresolve/chloresolve/uptime_pinging.py +++ b/chloresolve/chloresolve/uptime_pinging.py @@ -11,7 +11,6 @@ def __init__(self, interval_seconds: int, uri: str): self.interval_seconds = interval_seconds self.uri = uri self.loop = asyncio.get_event_loop() - self.task = self.loop.create_task(self.heartbeat()) self.logger = logging.getLogger(__class__.__name__) async def heartbeat(self): @@ -53,7 +52,7 @@ async def start(self): """ try: self.logger.info("Heartbeat task starting") - self.loop.run_until_complete(self.task) + self.task = self.loop.create_task(self.heartbeat()) except Exception as exc: self.logger.info("Heartbeat task failed or cancelled") self.logger.info(