![]() Thanks to ( ) ! 0.10.2 ()Īdd proper typing for functions wrapped with the decorator. info ( 'Foobar try %s ', ctx )Ĭtx contains: job_id, job_try, enqueue_time, score, metadata + all worker’s ctx (including custom context which can be passed via on_startup). ![]() Remove aioredis from dependencies to allow choose between aioredis and evo-aioredis - fork with Python 3.11 compatabilityĪdded ability to optionally pass ctx to the task, like ( with_ctx = True ) def foobar ( ctx ): log. ![]() 47 Changelog 0.11.1 ()Īdd Python 3.11 support (with evo-aioredis dependency instead of aioredis).run ( main ())Īnd start worker: python3 -m darq.cli -A some_project.darq_app.darq worker disconnect () if _name_ = '_main_' : asyncio. connect () # Direct call job as function: result = await add_to_42 ( 5 ) # result = 47 # Celery-like add task to queue: await add_to_42. I made a fork with compatability fixes: evo-aioredis ( ).īecause of this, aioredis is not currently added as Darq dependency, and you must install it yourself:įor Python int : return 42 + a async def main (): # Before adding tasks to queue we should connect darq instance to redis await darq. Unfortunately, this library has been abandoned, and does not support Python 3.11. Graceful shutdown: waits until running tasks are finishedĭarq uses aioredis 1.x as Redis client. ![]() delay() will be checked against the original function signature Proper mypy type checking: all arguments passed to. Async task manager with Celery-like features. ![]()
0 Comments
Leave a Reply. |