Skip to content

Commit a7b06d2

Browse files
author
zhouli
committed
version from 5.0.2 to 5.0.3
1 parent 4c2ab6b commit a7b06d2

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

python/rocketmq/v5/client/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def _retrieve_topic_route_data(self, topic):
285285
self.__topics.add(topic)
286286
return route
287287
else:
288-
raise Exception(f"retrieve topic:{topic} route, but route is None.")
288+
raise Exception(f"failed to fetch topic:{topic} route.")
289289

290290
def _remove_unused_topic_route_data(self, topic):
291291
self.__topic_route_cache.remove(topic)

python/rocketmq/v5/client/connection/rpc_channel.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
import asyncio
1717
import time
18+
1819
import grpc
1920
from grpc import ChannelConnectivity, aio
2021
from grpc.aio import AioRpcError

python/rocketmq/v5/client/connection/rpc_client.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ def retrieve_or_create_channel(self, endpoints: RpcEndpoints):
5959
raise Exception("RpcClient is not running.")
6060
try:
6161
# get or create a new grpc channel
62-
channel = self.__get_channel(endpoints)
63-
if channel is not None:
64-
channel.update_time = int(time.time())
65-
else:
66-
with RpcClient._channel_lock:
67-
channel = RpcChannel(endpoints, self.__tls_enable)
68-
channel.create_channel(RpcClient.get_channel_io_loop())
69-
self.__put_channel(endpoints, channel)
70-
return channel
62+
channel = self.__get_channel(endpoints)
63+
if channel is not None:
64+
channel.update_time = int(time.time())
65+
else:
66+
with RpcClient._channel_lock:
67+
channel = RpcChannel(endpoints, self.__tls_enable)
68+
channel.create_channel(RpcClient.get_channel_io_loop())
69+
self.__put_channel(endpoints, channel)
70+
return channel
7171
except Exception as e:
7272
logger.error(f"retrieve or create channel exception: {e}")
7373
raise e
@@ -139,7 +139,7 @@ def notify_client_termination(self, endpoints: RpcEndpoints, req: NotifyClientTe
139139

140140
def end_transaction_for_server_check(self, endpoints: RpcEndpoints, req: EndTransactionRequest, metadata,
141141
timeout=3):
142-
## assert asyncio.get_running_loop() == RpcClient._io_loop
142+
# assert asyncio.get_running_loop() == RpcClient._io_loop
143143
try:
144144
return self.__end_transaction_0(endpoints, req, metadata=metadata, timeout=timeout)
145145
except Exception as e:
@@ -204,7 +204,6 @@ async def __notify_client_termination_0(self, endpoints: RpcEndpoints, req: Noti
204204
async def __create_channel_async(self, endpoints: RpcEndpoints):
205205
return self.retrieve_or_create_channel(endpoints)
206206

207-
208207
""" private """
209208

210209
def __get_channel(self, endpoints: RpcEndpoints) -> RpcChannel:

python/rocketmq/v5/util/misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Misc:
2929
__OS_NAME = None
3030
TOPIC_PATTERN = compile(r'^[%a-zA-Z0-9_-]+$')
3131
CONSUMER_GROUP_PATTERN = compile(r'^[%a-zA-Z0-9_-]+$')
32-
SDK_VERSION = "5.0.2"
32+
SDK_VERSION = "5.0.3"
3333

3434
@staticmethod
3535
def sdk_language():

python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
setup(
1919
name='rocketmq-python-client',
20-
version='5.0.2',
20+
version='5.0.3',
2121
packages=find_packages(),
2222
install_requires=[
2323
"grpcio>=1.5.0",

0 commit comments

Comments
 (0)