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.
23 lines
377 B
Makefile
23 lines
377 B
Makefile
PYTHON=./.venv/bin/python
|
|
PIP=./.venv/bin/pip
|
|
APP=./.venv/bin/snek.serve
|
|
GUNICORN=./.venv/bin/gunicorn
|
|
GUNICORN_WORKERS = 1
|
|
PORT = 8081
|
|
|
|
python:
|
|
$(PYTHON)
|
|
|
|
dump:
|
|
@$(PYTHON) -m snek.dump
|
|
|
|
run:
|
|
$(GUNICORN) -w $(GUNICORN_WORKERS) -k aiohttp.worker.GunicornWebWorker snek.gunicorn:app --bind 0.0.0.0:$(PORT) --reload
|
|
|
|
install:
|
|
python3 -m venv .venv
|
|
$(PIP) install -e .
|
|
|
|
|
|
|