aomarket-bot

Standalone Anarchy Online market-tracking bot

View the Project on GitHub zznathans/aomarket-bot

bot

Runs the AO chat session on its own thread and drives the two background loops (poll and auto-track) that keep watched items up to date.

Files

Concurrency model

The bot runs on a dedicated, non-daemon thread with its own asyncio event loop — entirely separate from the FastAPI/uvicorn event loop main.py runs on. The API reaches into the bot thread by scheduling coroutines onto BotHandle.loop via asyncio.run_coroutine_threadsafe (see api/README.md’s call_on_bot bridge) rather than sharing any state directly. If AO_LOGIN/AO_PASSWORD/AO_CHARACTER aren’t set, this thread is never started at all — the process runs in API-only mode, and BotHandle stays None.