2023-01-07 17:59:36 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import json
|
|
|
|
from typing import Any, Dict
|
|
|
|
|
2023-04-10 01:39:19 +00:00
|
|
|
from ..srne import Srne
|
2023-01-07 17:59:36 +00:00
|
|
|
from . import BaseConsumer
|
|
|
|
|
|
|
|
|
|
|
|
class StdoutConsumer(BaseConsumer):
|
2023-04-10 01:39:19 +00:00
|
|
|
def __init__(self, settings: Dict[str, Any], srne: Srne) -> None:
|
|
|
|
super().__init__(settings, srne)
|
2023-01-07 17:59:36 +00:00
|
|
|
|
|
|
|
def poll(self):
|
|
|
|
return super().poll()
|
|
|
|
|
|
|
|
def write(self, data: Dict[str, Any]):
|
|
|
|
print(json.dumps(data))
|