Add StdoutConsumer
This commit is contained in:
parent
4d96174cfa
commit
ad51e0debe
1 changed files with 16 additions and 0 deletions
16
srnemqtt/consumers/stdio.py
Normal file
16
srnemqtt/consumers/stdio.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import json
|
||||
from typing import Any, Dict
|
||||
|
||||
from . import BaseConsumer
|
||||
|
||||
|
||||
class StdoutConsumer(BaseConsumer):
|
||||
def __init__(self, settings: Dict[str, Any]) -> None:
|
||||
super().__init__(settings)
|
||||
|
||||
def poll(self):
|
||||
return super().poll()
|
||||
|
||||
def write(self, data: Dict[str, Any]):
|
||||
print(json.dumps(data))
|
Loading…
Reference in a new issue