Up the lint score a bit

This commit is contained in:
Vladan Popovic 2020-09-06 01:06:33 +02:00
parent 8ca5d145bd
commit c6b4296c61
1 changed files with 6 additions and 2 deletions

View File

@ -4,8 +4,7 @@ Sample consumer.
import asyncio import asyncio
import json import json
import logging import logging
import time from typing import Optional
from typing import Any, Dict, Optional
import aiokafka # type: ignore import aiokafka # type: ignore
import asyncpg # type: ignore import asyncpg # type: ignore
@ -15,6 +14,11 @@ from chweb.models import Check, Config, PostgresConfig
class Consumer(Service): 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, def __init__(self, config: Config,
logger: logging.Logger, logger: logging.Logger,
event_loop: asyncio.AbstractEventLoop, event_loop: asyncio.AbstractEventLoop,