Remove commented code for debugging

master
Mark Veidemanis 2 years ago
parent ced3a251b2
commit 5ebae02bf2

12
db.py

@ -62,12 +62,12 @@ async def store_kafka_batch(data):
KAFKA_TOPIC = index
# if key in schema:
# if isinstance(value, int):
# if schema[key].startswith("string") or schema[key].startswith(
# "text"
# ):
# msg[key] = str(value)
# if key in schema:
# if isinstance(value, int):
# if schema[key].startswith("string") or schema[key].startswith(
# "text"
# ):
# msg[key] = str(value)
body = orjson.dumps(msg)
if "ts" not in msg:
raise Exception("No TS in msg")

@ -16,13 +16,13 @@ if not token:
async def main(loop):
# log.info("Starting Discord handler.")
# client = DiscordClient()
# loop.create_task(client.start(token))
log.info("Starting Discord handler.")
client = DiscordClient()
loop.create_task(client.start(token))
# log.info("Starting 4chan handler.")
# chan = Chan4()
# loop.create_task(chan.run())
log.info("Starting 4chan handler.")
chan = Chan4()
loop.create_task(chan.run())
log.info("Starting ingest handler.")
ingest = Ingest()

@ -9,8 +9,8 @@ from processing import process
SOURCES = ["4ch", "irc", "dis"]
# DEBUG CODE REMOVE ME
SOURCES.remove("4ch")
SOURCES.remove("dis")
# SOURCES.remove("4ch")
# SOURCES.remove("dis")
# DEBUG CODE REMOVE ME
KEYPREFIX = "queue."

Loading…
Cancel
Save