mirror of https://github.com/langgenius/dify.git
docs(api): add a short note about the `target_node` argument
This commit is contained in:
parent
79b6117d80
commit
b893d2df82
|
|
@ -70,6 +70,10 @@ class _RedisShardedSubscription(RedisSubscriptionBase):
|
|||
# Since we have already filtered at the caller's site, we can safely set
|
||||
# `ignore_subscribe_messages=False`.
|
||||
if isinstance(self._client, RedisCluster):
|
||||
# NOTE(QuantumGhost): due to an issue in upstream code, calling `get_sharded_message`
|
||||
# would use busy-looping to wait for incoming message, consuming excessive CPU quota.
|
||||
#
|
||||
# Here we specify the `target_node` to mitigate this problem.
|
||||
node = self._client.get_node_from_key(self._topic)
|
||||
return self._pubsub.get_sharded_message(
|
||||
ignore_subscribe_messages=False,
|
||||
|
|
|
|||
Loading…
Reference in New Issue