diff options
author | vela-jabber <host@sum7.eu> | 2021-04-17 17:58:42 +0200 |
---|---|---|
committer | vela-jabber <host@sum7.eu> | 2021-04-17 17:58:42 +0200 |
commit | c42b0f8a51b944b358500fd70af5168fb508f5b4 (patch) | |
tree | d25a1f9860099d85050cbfcd9689baa2c3e60a4e | |
parent | d2d8ef2880f256af752ac362fdba34d3f64c3526 (diff) |
-rwxr-xr-x | prometheus.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/prometheus.py b/prometheus.py index 676b6fc..4ffbcfd 100755 --- a/prometheus.py +++ b/prometheus.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- import logging -from http.server import BaseHTTPRequestHandler, HTTPServer +from http.server import BaseHTTPRequestHandler, HTTPServer, ThreadingHTTPServer from socket import AF_INET6 from time import time from urllib.parse import parse_qs, urlparse @@ -126,7 +126,7 @@ class Prometheus: def listen(self, addr=("127.0.0.1", 8080)): if "::" in addr[0]: HTTPServer.address_family = AF_INET6 - server = HTTPServer(addr, DynamicMetricsHandler.factory(self.handler)) + server = ThreadingHTTPServer(addr, DynamicMetricsHandler.factory(self.handler)) server.serve_forever() |