Skip to content

Commit

Permalink
Merge branch 'release/0.10.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
s3rius committed Oct 17, 2023
2 parents 0adfcee + 29913ce commit b137807
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 58 deletions.
113 changes: 60 additions & 53 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ packaging = ">=19"
# For prometheus metrics
prometheus_client = { version = "^0", optional = true }
# For ZMQBroker
pyzmq = { version = "^23.2.0", optional = true }
pyzmq = { version = "^23.2.0", optional = true, markers = "python_version < '3.12'"}
# For speed
uvloop = { version = ">=0.16.0,<1", optional = true, markers = "sys_platform != 'win32'" }
# For hot-reload.
Expand Down
8 changes: 4 additions & 4 deletions taskiq/cli/worker/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ def interrupt_handler(signum: int, _frame: Any) -> None:
event.set()

if uvloop is not None:
logger.debug("UVLOOP found. Installing policy.")
uvloop.install()
logger.debug("UVLOOP found. Using it as async runner")
loop = uvloop.new_event_loop() # type: ignore
else:
loop = asyncio.new_event_loop()
# This option signals that current
# broker is running as a worker.
# We must set this field before importing tasks,
Expand All @@ -128,8 +130,6 @@ def interrupt_handler(signum: int, _frame: Any) -> None:
receiver_type = get_receiver_type(args)
receiver_kwargs = dict(args.receiver_arg)

loop = asyncio.get_event_loop()

try:
logger.debug("Initialize receiver.")
with ThreadPoolExecutor(args.max_threadpool_threads) as pool:
Expand Down

0 comments on commit b137807

Please sign in to comment.