This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jwt | |
import time | |
import asyncio | |
import websockets | |
from websockets.extensions import permessage_deflate | |
from config import huya_app_id, huya_app_secret | |
async def keep_alive(ws): | |
while True: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from aiokafka import AIOKafkaConsumer | |
import asyncio | |
import tracemalloc | |
tracemalloc.start() | |
kafka_host, kafka_port, kafka_consumer_group = '127.0.0.1', 9092, 'mygroup-id' | |
async def consume(topic, group_id): |