Fix typo
This commit is contained in:
parent
3f6762f0bb
commit
cd6937fb26
|
@ -113,7 +113,7 @@ in_flight_requests_db_sched_duration = Counter(
|
||||||
_in_flight_requests = set()
|
_in_flight_requests = set()
|
||||||
|
|
||||||
# Protects the _in_flight_requests set from concurrent accesss
|
# Protects the _in_flight_requests set from concurrent accesss
|
||||||
_in_flight_reqeuests_lock = threading.Lock()
|
_in_flight_requests_lock = threading.Lock()
|
||||||
|
|
||||||
|
|
||||||
def _get_in_flight_counts():
|
def _get_in_flight_counts():
|
||||||
|
@ -124,7 +124,7 @@ def _get_in_flight_counts():
|
||||||
"""
|
"""
|
||||||
# Cast to a list to prevent it changing while the Prometheus
|
# Cast to a list to prevent it changing while the Prometheus
|
||||||
# thread is collecting metrics
|
# thread is collecting metrics
|
||||||
with _in_flight_reqeuests_lock:
|
with _in_flight_requests_lock:
|
||||||
reqs = list(_in_flight_requests)
|
reqs = list(_in_flight_requests)
|
||||||
|
|
||||||
for rm in reqs:
|
for rm in reqs:
|
||||||
|
@ -159,11 +159,11 @@ class RequestMetrics(object):
|
||||||
# to the "in flight" metrics.
|
# to the "in flight" metrics.
|
||||||
self._request_stats = self.start_context.get_resource_usage()
|
self._request_stats = self.start_context.get_resource_usage()
|
||||||
|
|
||||||
with _in_flight_reqeuests_lock:
|
with _in_flight_requests_lock:
|
||||||
_in_flight_requests.add(self)
|
_in_flight_requests.add(self)
|
||||||
|
|
||||||
def stop(self, time_sec, request):
|
def stop(self, time_sec, request):
|
||||||
with _in_flight_reqeuests_lock:
|
with _in_flight_requests_lock:
|
||||||
_in_flight_requests.discard(self)
|
_in_flight_requests.discard(self)
|
||||||
|
|
||||||
context = LoggingContext.current_context()
|
context = LoggingContext.current_context()
|
||||||
|
|
Loading…
Reference in New Issue