From c6b4296c61876ef6900dc6780e553ddecc96fe3b Mon Sep 17 00:00:00 2001 From: Vladan Popovic Date: Sun, 6 Sep 2020 01:06:33 +0200 Subject: [PATCH] Up the lint score a bit --- src/chweb/consumer.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/chweb/consumer.py b/src/chweb/consumer.py index d543620..6dd9128 100644 --- a/src/chweb/consumer.py +++ b/src/chweb/consumer.py @@ -4,8 +4,7 @@ Sample consumer. import asyncio import json import logging -import time -from typing import Any, Dict, Optional +from typing import Optional import aiokafka # type: ignore import asyncpg # type: ignore @@ -15,6 +14,11 @@ from chweb.models import Check, Config, PostgresConfig class Consumer(Service): + """ + Consumes messages from the kafka topic and if they are correct, i.e. if + they can be serialized in a :class:`chweb.models.Check` object, then they + are saved in the database. + """ def __init__(self, config: Config, logger: logging.Logger, event_loop: asyncio.AbstractEventLoop,