From c9762ce6fae6f6ae78eb432d5cc3f1c29d6e7d28 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Mon, 10 Aug 2020 15:49:44 -0400 Subject: [PATCH] Fix typos in asyncio daemon tutorial --- docs/tutorials/asyncio-daemon.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/tutorials/asyncio-daemon.rst b/docs/tutorials/asyncio-daemon.rst index 77a4d5ea..a6b6443a 100644 --- a/docs/tutorials/asyncio-daemon.rst +++ b/docs/tutorials/asyncio-daemon.rst @@ -587,7 +587,7 @@ Now we're ready to add the ``HttpMonitor``. We will add it to the ``monitors`` m Edit ``monitors.py``: .. code-block:: python - :emphasize-lines: 4-5,7,20-54 + :emphasize-lines: 4-5,7,20-56 """Monitors module.""" @@ -621,10 +621,6 @@ Edit ``monitors.py``: self._timeout = options.pop('timeout') super().__init__(check_every=options.pop('check_every')) - @property - def full_name(self) -> str: - return '{0}.{1}(url="{2}")'.format(__name__, self.__class__.__name__, self._url) - async def check(self) -> None: time_start = time.time() @@ -638,7 +634,13 @@ Edit ``monitors.py``: time_took = time_end - time_start self.logger.info( - 'Response code: %s, content length: %s, request took: %s seconds', + 'Check\n' + ' %s %s\n' + ' response code: %s\n' + ' content length: %s\n' + ' request took: %s seconds\n', + self._method, + self._url, response.status, response.content_length, round(time_took, 3)