feat: convert dump script to async and write output to dump.json

Convert dump_public_channels to async function with asyncio.run entry point, add fix_message helper to transform message records with user lookup, filter channels by tag='public', order messages by created_at, and write formatted JSON output to dump.json file instead of stdout. Also suppress verbose cache debug prints in Cache class.
This commit is contained in:
2025-03-18 00:13:25 +00:00
parent ca5490d558
commit af6aa9ce1c
3 changed files with 27 additions and 11 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ python:
$(PYTHON)
dump:
$(PYTHON) -m snek.dump
@$(PYTHON) -m snek.dump
run:
$(GUNICORN) -w $(GUNICORN_WORKERS) -k aiohttp.worker.GunicornWebWorker snek.gunicorn:app --bind 0.0.0.0:$(PORT) --reload