Skip to content

Commit c167cc8

Browse files
authored
Merge pull request #95 from shreyasSarve/shreyas-dev
Remove all print statements #93
2 parents 27816d4 + c76729c commit c167cc8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/app/worker.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import asyncio
2-
2+
import logging
33
import uvloop
44
from arq.connections import RedisSettings
55
from arq.worker import Worker
@@ -8,6 +8,8 @@
88

99
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
1010

11+
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")
12+
1113
REDIS_QUEUE_HOST = settings.REDIS_QUEUE_HOST
1214
REDIS_QUEUE_PORT = settings.REDIS_QUEUE_PORT
1315

@@ -20,11 +22,11 @@ async def sample_background_task(ctx: Worker, name: str) -> str:
2022

2123
# -------- base functions --------
2224
async def startup(ctx: Worker) -> None:
23-
print("worker start")
25+
logging.info('Worker Started')
2426

2527

2628
async def shutdown(ctx: Worker) -> None:
27-
print("worker end")
29+
logging.info("Worker end")
2830

2931

3032
# -------- class --------

0 commit comments

Comments
 (0)