tobymao / saq

Simple Async Queues

Home Page:https://saq-py.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Context Worker

genfild opened this issue · comments

The example uses context change, which doesn't work.

async def startup(ctx):
    ctx["db"] = await create_db()

The following code works
ctx['worker'].context["db"] = await create_db()