aiomisc 17.7.5__tar.gz → 17.7.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {aiomisc-17.7.5 → aiomisc-17.7.7}/PKG-INFO +1 -1
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/carbon.py +2 -1
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/profiler.py +10 -8
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/sdwatchdog.py +4 -1
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/tracer.py +2 -1
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/version.py +2 -2
- {aiomisc-17.7.5 → aiomisc-17.7.7}/pyproject.toml +1 -1
- {aiomisc-17.7.5 → aiomisc-17.7.7}/COPYING +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/README.rst +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/__init__.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/_context_vars.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/aggregate.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/backoff.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/circuit_breaker.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/compat.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/context.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/counters.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/cron.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/entrypoint.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/io.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/iterator_wrapper.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/log.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/periodic.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/plugins/__init__.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/plugins/__main__.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/pool.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/process_pool.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/py.typed +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/recurring.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/__init__.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/aiohttp.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/asgi.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/base.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/cron.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/dns/__init__.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/dns/records.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/dns/service.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/dns/store.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/dns/tree.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/dns/zone.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/grpc_server.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/periodic.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/process.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/raven.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/tcp.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/tls.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/udp.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/service/uvicorn.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/signal.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/thread_pool.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/timeout.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/utils.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc/worker_pool.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc_log/__init__.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc_log/enum.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc_log/formatter/__init__.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc_log/formatter/color.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc_log/formatter/journald.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc_log/formatter/json.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc_log/formatter/rich.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc_log/py.typed +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc_worker/__init__.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc_worker/__main__.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc_worker/forking.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc_worker/process.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc_worker/process_inner.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc_worker/protocol.py +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc_worker/py.typed +0 -0
- {aiomisc-17.7.5 → aiomisc-17.7.7}/aiomisc_worker/worker.py +0 -0
@@ -34,6 +34,7 @@ class CarbonSender(Service):
|
|
34
34
|
protocol: str = "udp"
|
35
35
|
namespace: Iterable[str] = ("",)
|
36
36
|
storage = TotalStorage
|
37
|
+
name: str = "carbon-sender"
|
37
38
|
_handle: PeriodicCallback
|
38
39
|
|
39
40
|
async def start(self) -> None:
|
@@ -50,7 +51,7 @@ class CarbonSender(Service):
|
|
50
51
|
|
51
52
|
set_client(client)
|
52
53
|
|
53
|
-
self._handle = PeriodicCallback(client.send)
|
54
|
+
self._handle = PeriodicCallback(client.send, name=self.name)
|
54
55
|
self._handle.start(self.send_interval, loop=self.loop)
|
55
56
|
log.info(
|
56
57
|
"Periodic carbon metrics sender started. Send to %s://%s:%d with "
|
@@ -9,17 +9,19 @@ from .base import Service
|
|
9
9
|
|
10
10
|
|
11
11
|
class Profiler(Service):
|
12
|
-
profiler
|
13
|
-
periodic
|
12
|
+
profiler: cProfile.Profile
|
13
|
+
periodic: PeriodicCallback
|
14
14
|
|
15
|
-
order = "cumulative"
|
15
|
+
order: str = "cumulative"
|
16
16
|
|
17
|
-
path = None
|
18
|
-
logger
|
17
|
+
path: Optional[str] = None
|
18
|
+
logger: logging.Logger
|
19
19
|
|
20
|
-
interval = 10
|
21
|
-
top_results = 10
|
22
|
-
log = logging.getLogger(__name__)
|
20
|
+
interval: int = 10
|
21
|
+
top_results: int = 10
|
22
|
+
log: logging.Logger = logging.getLogger(__name__)
|
23
|
+
|
24
|
+
name: str = "profiler"
|
23
25
|
|
24
26
|
async def start(self) -> None:
|
25
27
|
self.logger = self.log.getChild(str(id(self)))
|
@@ -37,6 +37,7 @@ class SDWatchdogService(Service):
|
|
37
37
|
socket_addr: Optional[str]
|
38
38
|
watchdog_interval: Optional[TimeoutType] = None
|
39
39
|
watchdog_timer: PeriodicCallback
|
40
|
+
name: str = "systemd-watchdog"
|
40
41
|
|
41
42
|
def __init__(
|
42
43
|
self,
|
@@ -86,7 +87,9 @@ class SDWatchdogService(Service):
|
|
86
87
|
sock.close()
|
87
88
|
|
88
89
|
async def start(self) -> None:
|
89
|
-
self.watchdog_timer = PeriodicCallback(
|
90
|
+
self.watchdog_timer = PeriodicCallback(
|
91
|
+
self.send, "WATCHDOG=1", name=self.name,
|
92
|
+
)
|
90
93
|
|
91
94
|
if self.is_connected and self.watchdog_interval is not None:
|
92
95
|
if self.watchdog_interval != WATCHDOG_INTERVAL:
|
@@ -28,6 +28,7 @@ class MemoryTracer(Service):
|
|
28
28
|
top_results: int = 20
|
29
29
|
|
30
30
|
group_by: GroupBy = GroupBy.lineno
|
31
|
+
name: str = "memory-tracer"
|
31
32
|
|
32
33
|
STAT_FORMAT: str = (
|
33
34
|
"%(count)8s | "
|
@@ -41,7 +42,7 @@ class MemoryTracer(Service):
|
|
41
42
|
log.warning("Start memory tracer")
|
42
43
|
tracemalloc.start()
|
43
44
|
|
44
|
-
self._tracer = PeriodicCallback(self.show_stats)
|
45
|
+
self._tracer = PeriodicCallback(self.show_stats, name=self.name)
|
45
46
|
self._log = log.getChild(str(id(self)))
|
46
47
|
|
47
48
|
self._snapshot_on_start = self.take_snapshot()
|
@@ -1,7 +1,7 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "aiomisc"
|
3
3
|
# This is a dummy version which will be rewritten with poem-plugins
|
4
|
-
version = "17.7.
|
4
|
+
version = "17.7.7"
|
5
5
|
description = "aiomisc - miscellaneous utils for asyncio"
|
6
6
|
authors = ["Dmitry Orlov <me@mosquito.su>"]
|
7
7
|
readme = "README.rst"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|