Commit Graph

19 Commits

Author SHA1 Message Date
Vladan Popovic 1a75b1e0b8 Use the producer and collector properly 2020-09-06 01:58:38 +02:00
Vladan Popovic 99a99a6122 Increase caution in the consumer
- Fail on invalid data received from the broker.
- Remove the context manager since it's an unnecessary complication.
- Make most of the fields in the Check model mandatory.
- introduce more mandatory fields in the config models.
2020-09-06 01:52:54 +02:00
Vladan Popovic c6b4296c61 Up the lint score a bit 2020-09-06 01:06:33 +02:00
Vladan Popovic 8ca5d145bd Move the kafka consumer to the object 2020-09-06 00:56:52 +02:00
Vladan Popovic af6d59ca97 Put db in the constructor 2020-09-06 00:50:01 +02:00
Vladan Popovic 3ec541c3f5 Fix formatting, log debug kafka calls 2020-09-06 00:42:21 +02:00
Vladan Popovic 2b9435dddd Add unit tests with 68% coverage, refactor a bit 2020-09-06 00:23:34 +02:00
Vladan Popovic 7967b1d024 Handle broken messages, add logger to Db 2020-09-04 03:04:21 +02:00
Vladan Popovic 0189f66cec Implement database operations 2020-09-05 02:38:01 +02:00
Vladan Popovic b23bf037e0 Finish documentation (more or less) 2020-09-05 01:50:54 +02:00
Vladan Popovic fff8e6e4cc Refactor once again
- Split collector and producer.
- Rename Application to Service.
- Use __call__() instead of run().
2020-09-05 00:06:57 +02:00
Vladan Popovic cc4b49a34e Enable documentation build with tox 2020-09-04 22:17:58 +02:00
Vladan Popovic 99785ab69c Update docstrings + type annotations in Collector 2020-09-04 19:56:41 +02:00
Vladan Popovic eaf0b51fe9 Take out common code in a base class 2020-09-04 19:45:43 +02:00
Vladan Popovic 916fcf1bab Add logging 2020-09-04 19:45:18 +02:00
Vladan Popovic 60a944cf5e Refactor, rename and fix pydantic errors 2020-09-04 18:22:49 +02:00
Vladan Popovic d9b04b9468 Add pydantic models for config and check info 2020-09-04 18:21:54 +02:00
Vladan Popovic cc2c0e492b First raw version of the stats collector 2020-09-04 00:24:21 +02:00
Vladan Popovic 83985be518 Initial empty commit 2020-09-04 00:23:30 +02:00