aiomisc 17.7.6__py3-none-any.whl → 17.7.8__py3-none-any.whl
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/iterator_wrapper.py +6 -0
- aiomisc/service/carbon.py +2 -1
- aiomisc/service/periodic.py +1 -2
- aiomisc/utils.py +4 -1
- aiomisc/version.py +2 -2
- aiomisc/worker_pool.py +1 -0
- {aiomisc-17.7.6.dist-info → aiomisc-17.7.8.dist-info}/METADATA +1 -1
- {aiomisc-17.7.6.dist-info → aiomisc-17.7.8.dist-info}/RECORD +11 -11
- {aiomisc-17.7.6.dist-info → aiomisc-17.7.8.dist-info}/WHEEL +1 -1
- {aiomisc-17.7.6.dist-info → aiomisc-17.7.8.dist-info}/COPYING +0 -0
- {aiomisc-17.7.6.dist-info → aiomisc-17.7.8.dist-info}/entry_points.txt +0 -0
aiomisc/iterator_wrapper.py
CHANGED
@@ -213,6 +213,12 @@ class IteratorWrapper(AsyncIterator, EventLoopMixin):
|
|
213
213
|
|
214
214
|
def close(self) -> Awaitable[None]:
|
215
215
|
self.__channel.close()
|
216
|
+
# if the iterator inside thread is blocked on `.put()`
|
217
|
+
# we need to wake it up to signal that it is closed.
|
218
|
+
try:
|
219
|
+
self.__channel.queue.get()
|
220
|
+
except QueueEmpty:
|
221
|
+
pass
|
216
222
|
return asyncio.ensure_future(self.wait_closed())
|
217
223
|
|
218
224
|
async def wait_closed(self) -> None:
|
aiomisc/service/carbon.py
CHANGED
@@ -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, name=
|
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 "
|
aiomisc/service/periodic.py
CHANGED
@@ -14,11 +14,10 @@ class PeriodicService(Service):
|
|
14
14
|
|
15
15
|
interval: Union[int, float]
|
16
16
|
delay: Union[int, float] = 0
|
17
|
-
name: str = "carbon-sender"
|
18
17
|
|
19
18
|
def __init__(self, *, name: Optional[str] = None, **kwargs: Any):
|
20
19
|
super().__init__(**kwargs)
|
21
|
-
self.periodic = PeriodicCallback(self.callback, name=
|
20
|
+
self.periodic = PeriodicCallback(self.callback, name=name)
|
22
21
|
|
23
22
|
async def start(self) -> None:
|
24
23
|
assert self.interval, f"Interval illegal interval {self.interval!r}"
|
aiomisc/utils.py
CHANGED
@@ -88,6 +88,10 @@ def bind_socket(
|
|
88
88
|
if not args and ":" in address:
|
89
89
|
sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 0)
|
90
90
|
|
91
|
+
unix_address_family = getattr(socket, "AF_UNIX", None)
|
92
|
+
if sock.family == unix_address_family:
|
93
|
+
reuse_port = False
|
94
|
+
|
91
95
|
if reuse_addr:
|
92
96
|
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
93
97
|
|
@@ -99,7 +103,6 @@ def bind_socket(
|
|
99
103
|
for level, option, value in options:
|
100
104
|
sock.setsockopt(level, option, value)
|
101
105
|
|
102
|
-
unix_address_family = getattr(socket, "AF_UNIX", None)
|
103
106
|
if sock.family == unix_address_family:
|
104
107
|
proto_name = proto_name or "unix"
|
105
108
|
sock.bind(address)
|
aiomisc/version.py
CHANGED
aiomisc/worker_pool.py
CHANGED
@@ -9,7 +9,7 @@ aiomisc/counters.py,sha256=ZU7K3FBY7V1jIKohWXXyXqby98FuOmq6H5Lv7Cf-c70,3686
|
|
9
9
|
aiomisc/cron.py,sha256=zAxdrLn8r7ERhkVaoUOv8xrQVZn7Hmm8HBS-MmsIu2s,2165
|
10
10
|
aiomisc/entrypoint.py,sha256=x85478I-nmza4niFc4Yb4QsnMdRrdyUQ1Ud5dACRduI,14256
|
11
11
|
aiomisc/io.py,sha256=PWBy_D6CVlfhHokQoVfzmHIvGb37VtUo1P-yedB9aL8,10004
|
12
|
-
aiomisc/iterator_wrapper.py,sha256=
|
12
|
+
aiomisc/iterator_wrapper.py,sha256=wDhehk3AB3bBvqErsTeDow0lXjBf1qbeylULMcDglJs,7463
|
13
13
|
aiomisc/log.py,sha256=UTu5fMwIK5OU9QrDoJqxyVwdQHVDkzPl1laav0SIb4o,6323
|
14
14
|
aiomisc/periodic.py,sha256=OFYZbPkcGgeMjBk8zwsLr2TqPRTS6MNewaL3q9qK5js,2252
|
15
15
|
aiomisc/plugins/__init__.py,sha256=eHKGec_217rBjXGf8u-Joyf7dzpO1O0QAuFan1IEyYE,1057
|
@@ -22,7 +22,7 @@ aiomisc/service/__init__.py,sha256=_JSkI4Q78UljG4CvhK6He2UGLxJaQS6cVwZ9QT0cSWo,6
|
|
22
22
|
aiomisc/service/aiohttp.py,sha256=Lfw1dm77zscBZP0H4sKYlVye7RfE0EPWeSSX5V-mvD0,4091
|
23
23
|
aiomisc/service/asgi.py,sha256=S6ejgg7GpHfUzuj46g8QuLXTHn0YWwqI_pAGbXfoNjE,1583
|
24
24
|
aiomisc/service/base.py,sha256=6xvD27Sh2jy-4JWer6n31FuSq798DZhLI730YYGQbYc,4322
|
25
|
-
aiomisc/service/carbon.py,sha256=
|
25
|
+
aiomisc/service/carbon.py,sha256=V60dFfjZqYXdSVsFFy5hyelVUKchpzTj4uvOosCJNmA,1791
|
26
26
|
aiomisc/service/cron.py,sha256=VM-FjdAhy_zFkU-YTdpBSxF79upvrsCo-3kdI9cZTOo,1975
|
27
27
|
aiomisc/service/dns/__init__.py,sha256=RT8_0H8LrQe8sz2xvA2BvLi6CiJVZeVFltNRAx9MN7o,254
|
28
28
|
aiomisc/service/dns/records.py,sha256=VE65kDSJ3Fg3-V60-AQQY2OxR89_ggaAc38k7vKUatM,8771
|
@@ -31,7 +31,7 @@ aiomisc/service/dns/store.py,sha256=PCYp-H1UoFzUVaYfSnK78_TG3fw1CeIzg-ndMgu_cE4,
|
|
31
31
|
aiomisc/service/dns/tree.py,sha256=q9VRcVxggrClUHyGZZqqSByMaHdU4nYPC1NdT17cVWM,1575
|
32
32
|
aiomisc/service/dns/zone.py,sha256=6Xmrl_leLalSiRQWWNuwGtZVw31Y93i9K2j0JU1vt-4,2174
|
33
33
|
aiomisc/service/grpc_server.py,sha256=G1iRGX3jAfv3fpzNnw_n6UuhORmIZK4cz6aAi7t7qcU,4553
|
34
|
-
aiomisc/service/periodic.py,sha256=
|
34
|
+
aiomisc/service/periodic.py,sha256=Q871Kw6L_L4EDKVl_0pJI2eLWpAjwYs9FnLKeCc9lBY,1283
|
35
35
|
aiomisc/service/process.py,sha256=mZf8muZJNWQo95pUmzchMk08MJMhLifFK8m4CnNX49k,4477
|
36
36
|
aiomisc/service/profiler.py,sha256=cqLCImHD2w1QZsu8cjliqeENsYd9p9tNzQa0KvdJCQ4,1406
|
37
37
|
aiomisc/service/raven.py,sha256=VHqnXWx-_r71_pjFniIB_E4CgT2reuRD1EB4yEC0hzE,12214
|
@@ -44,9 +44,9 @@ aiomisc/service/uvicorn.py,sha256=I2KYQL9ysFFqQHPYK00G4EoceA7J9p9Or6v1ATpLGw8,43
|
|
44
44
|
aiomisc/signal.py,sha256=_iiC2jukXg7-LLirIl1YATlKIIsKLbmTNFr1Ezheu7g,1728
|
45
45
|
aiomisc/thread_pool.py,sha256=591u5HV1aBmBRcaVm4kAtMLPZOb6veqhT9wkts_knqE,14017
|
46
46
|
aiomisc/timeout.py,sha256=5jNDooLW4MAe6ZUIKhkiX29CoyI0zlXd-dZoZwQPxak,920
|
47
|
-
aiomisc/utils.py,sha256=
|
48
|
-
aiomisc/version.py,sha256=
|
49
|
-
aiomisc/worker_pool.py,sha256=
|
47
|
+
aiomisc/utils.py,sha256=9VCtQEaU4QwdMUkWIprm9xvgCfp3y_D4E-Phj7L4S9A,11990
|
48
|
+
aiomisc/version.py,sha256=njZ0hWHm4vYzCXZUIPinMvUTxw0b8WzpVC33_3TJFD4,154
|
49
|
+
aiomisc/worker_pool.py,sha256=p1cNOduqHRur1a3SJ58yuEpgL08DgDea57Z2_wQ048U,11141
|
50
50
|
aiomisc_log/__init__.py,sha256=N3g8Ea1YE2dWPDd-MwohuAn3Y0pBxSyL4l4Jsxqkv0Q,4854
|
51
51
|
aiomisc_log/enum.py,sha256=_zfCZPYCGyI9KL6TqHiYVlOfA5U5MCbsuCuDKxDHdxg,1549
|
52
52
|
aiomisc_log/formatter/__init__.py,sha256=1dBtF7yRvyvAhQRAofhBN682r7COoAB8blzibJxlvS8,235
|
@@ -63,8 +63,8 @@ aiomisc_worker/process_inner.py,sha256=8ZtjCSLrgySW57OIbuGrpEWxfysRLYKx1or1YaAqx
|
|
63
63
|
aiomisc_worker/protocol.py,sha256=1smmlBbdreSmnrxuhHaUMUC10FO9xMIEcedhweQJX_A,2705
|
64
64
|
aiomisc_worker/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
65
65
|
aiomisc_worker/worker.py,sha256=f8nCFhlKh84UUBUaEgCllwMRvVZiD8_UUXaeit6g3T8,3236
|
66
|
-
aiomisc-17.7.
|
67
|
-
aiomisc-17.7.
|
68
|
-
aiomisc-17.7.
|
69
|
-
aiomisc-17.7.
|
70
|
-
aiomisc-17.7.
|
66
|
+
aiomisc-17.7.8.dist-info/COPYING,sha256=Ky_8CQMaIixfyOreUBsl0hKN6A5fLnPF8KPQ9molMYA,1125
|
67
|
+
aiomisc-17.7.8.dist-info/METADATA,sha256=UF00zYem4Gp2Y-xJ28fkV4Br2_PLclC3VPIVtWQ0kIg,15685
|
68
|
+
aiomisc-17.7.8.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
69
|
+
aiomisc-17.7.8.dist-info/entry_points.txt,sha256=KRsSPCwKJyGTWrvzpwbS0yIDwzsgDA2X6f0CBWYmNao,55
|
70
|
+
aiomisc-17.7.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|