8000 the parameter to block the flow and the lifetime of the lock are pass… · Litebox-official/client_python@b18e149 · GitHub
[go: up one dir, main page]

Skip to content

Commit b18e149

Browse files
author
Алексей Пермяков
committed
the parameter to block the flow and the lifetime of the lock are passed to get_redis_provider
1 parent ab426ac commit b18e149

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

prometheus_client/providers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ def get_name(self, typ, metric_name, name, labelnames, labelvalues,
8282
raise NotImplementedError('get_name() must be implemented by %r' % self)
8383

8484

85-
def get_redis_provider(redis_app):
85+
def get_redis_provider(redis_app, blocking=False, blocking_timeout=0.1):
8686
"""Returns a provider using Redis."""
8787

8888
class Provider(RedisProvider):
8989
"""Metric storage provider in Redis."""
9090

91-
BLOCKING = False
92-
BLOCKING_TIMEOUT = 0.1
91+
BLOCKING = blocking
92+
BLOCKING_TIMEOUT = blocking_timeout
9393

9494
def get_redis_app(self):
9595
return redis_app

0 commit comments

Comments
 (0)
0