boneIO 0.9.0.dev9__tar.gz → 0.9.0.dev11__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 (128) hide show
  1. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/PKG-INFO +1 -1
  2. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/oled.py +8 -6
  3. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/runner.py +52 -5
  4. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/schema/schema.yaml +10 -5
  5. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/sensor/gpio_new.py +3 -2
  6. boneio-0.9.0.dev11/boneio/version.py +2 -0
  7. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/webui/web_server.py +14 -3
  8. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/pyproject.toml +1 -1
  9. boneio-0.9.0.dev9/boneio/version.py +0 -2
  10. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/LICENSE +0 -0
  11. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/README.md +0 -0
  12. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/__init__.py +0 -0
  13. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/boards/0.7/input.yaml +0 -0
  14. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/boards/0.7/output_32_10.yaml +0 -0
  15. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/boards/0.8/input.yaml +0 -0
  16. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/boards/0.8/output_32_10.yaml +0 -0
  17. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/bonecli.py +0 -0
  18. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/const.py +0 -0
  19. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/cover.py +0 -0
  20. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/example_config/__init__.py +0 -0
  21. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/example_config/adc.yaml +0 -0
  22. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/example_config/binary_sensor.yaml +0 -0
  23. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/example_config/binary_sensor_v_0_7.yaml +0 -0
  24. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/example_config/config.yaml +0 -0
  25. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/example_config/cover.yaml +0 -0
  26. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/example_config/event.yaml +0 -0
  27. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/example_config/event_all.yaml +0 -0
  28. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/example_config/event_v_0_7.yaml +0 -0
  29. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/example_config/led32x4A.yaml +0 -0
  30. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/example_config/output24x16A.yaml +0 -0
  31. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/example_config/output24x16A_v0.3.yaml +0 -0
  32. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/example_config/output32x10A.yaml +0 -0
  33. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/example_config/output32x5A.yaml +0 -0
  34. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/fonts/danube__.ttf +0 -0
  35. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/group/__init__.py +0 -0
  36. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/group/output.py +0 -0
  37. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/__init__.py +0 -0
  38. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/async_updater.py +0 -0
  39. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/click_timer.py +0 -0
  40. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/config.py +0 -0
  41. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/events.py +0 -0
  42. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/exceptions.py +0 -0
  43. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/filter.py +0 -0
  44. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/gpio.py +0 -0
  45. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/gpiod.py +0 -0
  46. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/ha_discovery.py +0 -0
  47. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/loader.py +0 -0
  48. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/logger.py +0 -0
  49. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/message_bus.py +0 -0
  50. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/mqtt.py +0 -0
  51. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/oled.py +0 -0
  52. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/onewire/W1ThermSensor.py +0 -0
  53. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/onewire/__init__.py +0 -0
  54. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/onewire/ds2482.py +0 -0
  55. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/onewire/onewire.py +0 -0
  56. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/pcf8575.py +0 -0
  57. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/queue.py +0 -0
  58. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/sensor/ina_219_smbus.py +0 -0
  59. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/state_manager.py +0 -0
  60. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/stats.py +0 -0
  61. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/timeperiod.py +0 -0
  62. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/util.py +0 -0
  63. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/helper/yaml_util.py +0 -0
  64. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/input/__init__.py +0 -0
  65. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/input/gpio.py +0 -0
  66. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/input/gpio_new.py +0 -0
  67. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/manager.py +0 -0
  68. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/__init__.py +0 -0
  69. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/client.py +0 -0
  70. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/cwt.json +0 -0
  71. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/dts1964_3f.json +0 -0
  72. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/liquid-sensor.json +0 -0
  73. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/modbuscli.py +0 -0
  74. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/orno-or-we-517.json +0 -0
  75. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/pt100.json +0 -0
  76. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/r4dcb08.json +0 -0
  77. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/sdm120.json +0 -0
  78. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/sdm630.json +0 -0
  79. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/sensor.py +0 -0
  80. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/sht20.json +0 -0
  81. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/sht30.json +0 -0
  82. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/single_sensor.py +0 -0
  83. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/socomec_e03.json +0 -0
  84. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/socomec_e23.json +0 -0
  85. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/sofar.json +0 -0
  86. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/modbus/utils.py +0 -0
  87. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/models/__init__.py +0 -0
  88. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/models/files.py +0 -0
  89. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/models/logs.py +0 -0
  90. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/mqtt_client.py +0 -0
  91. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/relay/__init__.py +0 -0
  92. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/relay/basic.py +0 -0
  93. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/relay/gpio.py +0 -0
  94. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/relay/mcp.py +0 -0
  95. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/relay/pca.py +0 -0
  96. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/relay/pcf.py +0 -0
  97. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/schema/actions.yaml +0 -0
  98. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/schema/actions_sensor.yaml +0 -0
  99. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/schema/actions_switch.yaml +0 -0
  100. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/schema/filters.yaml +0 -0
  101. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/schema/filters_adc.yaml +0 -0
  102. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/schema/id.yaml +0 -0
  103. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/schema/temp_unit.yaml +0 -0
  104. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/schema/update_interval.yaml +0 -0
  105. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/sensor/__init__.py +0 -0
  106. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/sensor/adc.py +0 -0
  107. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/sensor/gpio.py +0 -0
  108. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/sensor/ina219.py +0 -0
  109. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/sensor/serial_number.py +0 -0
  110. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/sensor/temp/__init__.py +0 -0
  111. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/sensor/temp/dallas.py +0 -0
  112. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/sensor/temp/lm75.py +0 -0
  113. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/sensor/temp/mcp9808.py +0 -0
  114. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/webui/app.py +0 -0
  115. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/webui/frontend-dist/assets/css.worker-YzWC8yAR.js +0 -0
  116. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/webui/frontend-dist/assets/editor.worker-D5ngByhL.js +0 -0
  117. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/webui/frontend-dist/assets/html.worker-D5NPIcdM.js +0 -0
  118. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/webui/frontend-dist/assets/index-Bzix_ULo.js +0 -0
  119. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/webui/frontend-dist/assets/index-Dt_UdFzp.css +0 -0
  120. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/webui/frontend-dist/assets/json.worker-F0ZGA5Zk.js +0 -0
  121. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/webui/frontend-dist/assets/ts.worker-BSchkg-h.js +0 -0
  122. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/webui/frontend-dist/boneio.svg +0 -0
  123. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/webui/frontend-dist/boneio_fav.svg +0 -0
  124. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/webui/frontend-dist/index.html +0 -0
  125. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/boneio/webui/websocket_manager.py +0 -0
  126. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/tests/32_5_config.yaml +0 -0
  127. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/tests/bandit.yaml +0 -0
  128. {boneio-0.9.0.dev9 → boneio-0.9.0.dev11}/tests/relay_32_5.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: boneio
3
- Version: 0.9.0.dev9
3
+ Version: 0.9.0.dev11
4
4
  Summary: Python App for BoneIO
5
5
  License: GNU General Public License v3.0
6
6
  Author-email: Paweł Szafer <pszafer@gmail.com>
@@ -293,13 +293,15 @@ class Oled:
293
293
  display_image = Image.new("1", (128, 64), 0) # Mode 1, size 128x64, black background
294
294
  draw = ImageDraw.Draw(display_image)
295
295
 
296
- # Add title text
297
- title = "WebUI"
298
- draw.text((2, 2), title, font=fonts["small"], fill=WHITE)
296
+ # Add title text on the left side
297
+ # text_width = fonts["small"].getsize(title)[0]
298
+ draw.text((2, 2), "Scan to", font=fonts["small"], fill=WHITE)
299
+ draw.text((2, 12), "access", font=fonts["small"], fill=WHITE)
300
+ draw.text((2, 22), "webui", font=fonts["small"], fill=WHITE)
299
301
 
300
- # Calculate position to center the QR code, accounting for title
301
- x = (128 - qr_image.size[0]) // 2
302
- y = ((64 - qr_image.size[1]) // 2) + 5 # Add 5 pixels to move QR code down a bit
302
+ # Calculate position to align QR code to right and center vertically
303
+ x = 128 - qr_image.size[0] - 2 # Align to right with 2 pixels padding
304
+ y = ((64 - qr_image.size[1]) // 2) # Center vertically
303
305
 
304
306
  # Paste QR code onto center of display image
305
307
  display_image.paste(qr_image, (x, y))
@@ -5,6 +5,7 @@ from __future__ import annotations
5
5
  import asyncio
6
6
  import logging
7
7
  import os
8
+ import signal
8
9
  import warnings
9
10
  from typing import Any, Set
10
11
 
@@ -76,6 +77,17 @@ async def async_run(
76
77
  web_server = None
77
78
  tasks: Set[asyncio.Task] = set()
78
79
  event_bus = EventBus(loop=asyncio.get_event_loop())
80
+ shutdown_event = asyncio.Event()
81
+ loop = asyncio.get_event_loop()
82
+
83
+ def signal_handler():
84
+ """Handle shutdown signals."""
85
+ _LOGGER.info("Received shutdown signal, initiating graceful shutdown...")
86
+ shutdown_event.set()
87
+
88
+ # Register signal handlers
89
+ for sig in (signal.SIGTERM, signal.SIGINT):
90
+ loop.add_signal_handler(sig, signal_handler)
79
91
 
80
92
  event_bus_task = asyncio.create_task(event_bus.start())
81
93
  tasks.add(event_bus_task)
@@ -134,14 +146,13 @@ async def async_run(
134
146
 
135
147
  tasks.update(manager.get_tasks())
136
148
 
137
-
138
149
  message_bus_type = "MQTT" if isinstance(message_bus, MQTTClient) else "Local"
139
150
  _LOGGER.info("Starting message bus %s.", message_bus_type)
140
151
  message_bus_task = asyncio.create_task(message_bus.start_client())
141
152
  tasks.add(message_bus_task)
142
153
  message_bus_task.add_done_callback(tasks.discard)
143
154
 
144
- # Start web server if configured
155
+ # Start web server if configured
145
156
  if "web" in config:
146
157
  web_config = config.get("web") or {}
147
158
  _LOGGER.info("Starting Web server.")
@@ -159,15 +170,51 @@ async def async_run(
159
170
  web_server_task.add_done_callback(tasks.discard)
160
171
  else:
161
172
  _LOGGER.info("Web server not configured.")
173
+
162
174
  try:
163
- await asyncio.gather(*tasks)
175
+ # Convert tasks set to list for main gather
176
+ task_list = list(tasks)
177
+ main_gather = asyncio.gather(*task_list)
178
+
179
+ # Wait for either shutdown signal or main task completion
180
+ await asyncio.wait([
181
+ main_gather,
182
+ asyncio.create_task(shutdown_event.wait())
183
+ ], return_when=asyncio.FIRST_COMPLETED)
184
+
185
+ if shutdown_event.is_set():
186
+ _LOGGER.info("Starting graceful shutdown...")
187
+ main_gather.cancel()
188
+ try:
189
+ await main_gather
190
+ except asyncio.CancelledError:
191
+ pass
192
+
164
193
  return 0
165
194
  except asyncio.CancelledError:
166
- pass
195
+ _LOGGER.info("Main task cancelled")
167
196
  except (RestartRequestException, GracefulExit):
168
- pass
197
+ _LOGGER.info("Restart or graceful exit requested")
169
198
  except Exception as e:
170
199
  _LOGGER.error(f"Unexpected error: {type(e).__name__} - {e}")
171
200
  finally:
201
+ _LOGGER.info("Cleaning up resources...")
202
+ # Stop the event bus
172
203
  event_bus.request_stop()
204
+
205
+ # Create a copy of tasks set to avoid modification during iteration
206
+ remaining_tasks = list(tasks)
207
+ if remaining_tasks:
208
+ # Cancel and wait for all remaining tasks
209
+ for task in remaining_tasks:
210
+ if not task.done():
211
+ task.cancel()
212
+
213
+ # Wait for all tasks to complete
214
+ try:
215
+ await asyncio.gather(*remaining_tasks, return_exceptions=True)
216
+ except Exception as e:
217
+ _LOGGER.error(f"Error during cleanup: {type(e).__name__} - {e}")
218
+
219
+ _LOGGER.info("Shutdown complete")
173
220
  return 0
@@ -226,14 +226,19 @@ modbus_sensors:
226
226
  - lower
227
227
  allowed:
228
228
  [
229
- 'sdm630',
229
+ 'cwt',
230
+ 'dts1964_3f',
231
+ 'liquid-sensor',
232
+ 'orno-or-we-517',
233
+ 'pt100',
234
+ 'r4dcb08',
230
235
  'sdm120',
231
- 'sofar',
236
+ 'sdm630',
237
+ 'sht20',
238
+ 'sht30',
232
239
  'socomec_e03',
233
240
  'socomec_e23',
234
- 'cwt',
235
- 'orno-or-we-517',
236
- 'r4cb08'
241
+ 'sofar',
237
242
  ]
238
243
  meta:
239
244
  label: Model to load from database.
@@ -1,9 +1,10 @@
1
1
  """GpioInputBinarySensorNew to receive signals."""
2
2
 
3
3
  import logging
4
- from boneio.const import PRESSED, RELEASED, BOTH
5
- from boneio.helper import GpioBaseClass
6
4
  import time
5
+
6
+ from boneio.const import BOTH, PRESSED, RELEASED
7
+ from boneio.helper import GpioBaseClass
7
8
  from boneio.helper.gpio import add_event_callback, add_event_detect
8
9
 
9
10
  _LOGGER = logging.getLogger(__name__)
@@ -0,0 +1,2 @@
1
+ # flake8: noqa
2
+ __version__ = "0.9.0dev11"
@@ -46,9 +46,20 @@ class WebServer:
46
46
  self._hypercorn_config.bind = [f"0.0.0.0:{port}"]
47
47
  self._hypercorn_config.use_reloader = False
48
48
  self._hypercorn_config.worker_class = "asyncio"
49
- # if debug_level:
50
- # self._hypercorn_config.debug = debug_level == 1
51
- # self._hypercorn_config.loglevel = debug_level
49
+
50
+ # Configure Hypercorn's logging
51
+ hypercorn_logger = logging.getLogger('hypercorn.error')
52
+ hypercorn_logger.handlers = [] # Remove default handlers
53
+ hypercorn_logger.propagate = True # Use root logger's handlers
54
+
55
+ # Configure access log
56
+ hypercorn_access_logger = logging.getLogger('hypercorn.access')
57
+ hypercorn_access_logger.handlers = [] # Remove default handlers
58
+ hypercorn_access_logger.propagate = True # Use root logger's handlers
59
+
60
+ self._hypercorn_config.accesslog = hypercorn_access_logger
61
+ self._hypercorn_config.errorlog = hypercorn_logger
62
+
52
63
  self._hypercorn_config.graceful_timeout = 5.0
53
64
  # self._server = hypercorn.asyncio.serve(self.app, self._hypercorn_config)
54
65
  # Override the server's install_signal_handlers to prevent it from handling signals
@@ -35,7 +35,7 @@ dependencies = [
35
35
  "qrcode==7.4.2",
36
36
  ]
37
37
  requires-python = ">=3.7"
38
- version = "0.9.0.dev9"
38
+ version = "0.9.0.dev11"
39
39
 
40
40
  [project.license]
41
41
  text = "GNU General Public License v3.0"
@@ -1,2 +0,0 @@
1
- # flake8: noqa
2
- __version__ = "0.9.0dev9"
File without changes
File without changes