Skip to content

Commit

Permalink
Merge pull request #5 from use-py/rename_priority_to_properties
Browse files Browse the repository at this point in the history
perf: rename the priority parameter in the message sending method to properties
  • Loading branch information
mic1on authored Feb 16, 2025
2 parents 1550164 + 437caff commit a14dd96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "use-rabbitmq"
version = "0.2.2"
version = "0.2.3"
description = ""
authors = ["miclon <jcnd@163.com>"]
readme = "README.md"
Expand Down
4 changes: 2 additions & 2 deletions src/use_rabbitmq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ def send(
self,
queue_name: str,
message: Union[str, bytes],
priority: Optional[dict] = None,
properties: Optional[dict] = None,
**kwargs,
):
"""发送消息"""
attempts = 1
while True:
try:
self.channel.basic.publish(
message, queue_name, properties=priority, **kwargs
message, queue_name, properties=properties, **kwargs
)
return message
except Exception as exc:
Expand Down

0 comments on commit a14dd96

Please sign in to comment.