aiomisc 17.5.15__tar.gz → 17.5.17__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.
Files changed (63) hide show
  1. {aiomisc-17.5.15 → aiomisc-17.5.17}/PKG-INFO +1 -1
  2. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/service/uvicorn.py +8 -4
  3. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/version.py +2 -2
  4. {aiomisc-17.5.15 → aiomisc-17.5.17}/pyproject.toml +1 -1
  5. {aiomisc-17.5.15 → aiomisc-17.5.17}/COPYING +0 -0
  6. {aiomisc-17.5.15 → aiomisc-17.5.17}/README.rst +0 -0
  7. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/__init__.py +0 -0
  8. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/_context_vars.py +0 -0
  9. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/aggregate.py +0 -0
  10. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/backoff.py +0 -0
  11. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/circuit_breaker.py +0 -0
  12. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/compat.py +0 -0
  13. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/context.py +0 -0
  14. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/counters.py +0 -0
  15. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/cron.py +0 -0
  16. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/entrypoint.py +0 -0
  17. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/io.py +0 -0
  18. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/iterator_wrapper.py +0 -0
  19. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/log.py +0 -0
  20. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/periodic.py +0 -0
  21. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/plugins/__init__.py +0 -0
  22. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/plugins/__main__.py +0 -0
  23. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/pool.py +0 -0
  24. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/process_pool.py +0 -0
  25. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/py.typed +0 -0
  26. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/recurring.py +0 -0
  27. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/service/__init__.py +0 -0
  28. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/service/aiohttp.py +0 -0
  29. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/service/asgi.py +0 -0
  30. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/service/base.py +0 -0
  31. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/service/carbon.py +0 -0
  32. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/service/cron.py +0 -0
  33. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/service/grpc_server.py +0 -0
  34. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/service/periodic.py +0 -0
  35. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/service/process.py +0 -0
  36. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/service/profiler.py +0 -0
  37. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/service/raven.py +0 -0
  38. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/service/sdwatchdog.py +0 -0
  39. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/service/tcp.py +0 -0
  40. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/service/tls.py +0 -0
  41. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/service/tracer.py +0 -0
  42. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/service/udp.py +0 -0
  43. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/signal.py +0 -0
  44. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/thread_pool.py +0 -0
  45. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/timeout.py +0 -0
  46. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/utils.py +0 -0
  47. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc/worker_pool.py +0 -0
  48. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc_log/__init__.py +0 -0
  49. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc_log/enum.py +0 -0
  50. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc_log/formatter/__init__.py +0 -0
  51. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc_log/formatter/color.py +0 -0
  52. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc_log/formatter/journald.py +0 -0
  53. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc_log/formatter/json.py +0 -0
  54. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc_log/formatter/rich.py +0 -0
  55. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc_log/py.typed +0 -0
  56. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc_worker/__init__.py +0 -0
  57. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc_worker/__main__.py +0 -0
  58. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc_worker/forking.py +0 -0
  59. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc_worker/process.py +0 -0
  60. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc_worker/process_inner.py +0 -0
  61. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc_worker/protocol.py +0 -0
  62. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc_worker/py.typed +0 -0
  63. {aiomisc-17.5.15 → aiomisc-17.5.17}/aiomisc_worker/worker.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aiomisc
3
- Version: 17.5.15
3
+ Version: 17.5.17
4
4
  Summary: aiomisc - miscellaneous utils for asyncio
5
5
  Home-page: https://github.com/aiokitchen/aiomisc
6
6
  License: MIT
@@ -24,6 +24,7 @@ UvicornApplication = Union[ASGIApplication, Callable]
24
24
  class UvicornService(Service, abc.ABC):
25
25
  __async_required__: Tuple[str, ...] = (
26
26
  "start",
27
+ "stop",
27
28
  "create_application",
28
29
  )
29
30
 
@@ -114,8 +115,11 @@ class UvicornService(Service, abc.ABC):
114
115
  )
115
116
  if not self.sock:
116
117
  self.sock = config.bind_socket()
117
- server = Server(config)
118
-
119
- self.start_event.set()
118
+ self.server = Server(config)
119
+ self.serve_task = asyncio.create_task(
120
+ self.server.serve(sockets=[self.sock])
121
+ )
120
122
 
121
- await server.serve(sockets=[self.sock])
123
+ async def stop(self, exception: Optional[Exception] = None) -> None:
124
+ self.server.should_exit = True
125
+ await self.serve_task
@@ -2,5 +2,5 @@
2
2
  # BY: poem-plugins "git" plugin
3
3
  # NEVER EDIT THIS FILE MANUALLY
4
4
 
5
- version_info = (17, 5, 15)
6
- __version__ = "17.5.15"
5
+ version_info = (17, 5, 17)
6
+ __version__ = "17.5.17"
@@ -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.5.15"
4
+ version = "17.5.17"
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