5 Commits

4 changed files with 36 additions and 5 deletions

View File

@@ -2,6 +2,36 @@
All notable changes to this project will be documented in this file.
## [0.4.0] - 2025-11-30
### Bug Fixes
- [`115deaa`](https://github.com/pufereq/template-repo/commit/115deaab4b0aaa9f0d3577be56e64fa3bb03f76b) **backend_server.py**: use unused `packet_size` argument to `_receive_inbound()`
- [`cc6b650`](https://github.com/pufereq/template-repo/commit/cc6b650f5cd1f3889c251fbe7b36c681be48b2a0) **backend_server.py**: import Any from typing
- [`5024862`](https://github.com/pufereq/template-repo/commit/50248621650590c17fcf96c0cec9618a2b0dd07c) **backend_server.py**: add 1ms sleep to prevent 100% CPU usage in `_loop()`
- [`f0eeeb7`](https://github.com/pufereq/template-repo/commit/f0eeeb79a188548c3f306f4bc875bacc6fd89588) **backend_server.py**: handle unregister exceptions
### Features
- [`6f5fa33`](https://github.com/pufereq/template-repo/commit/6f5fa33a122e9ebdf9df91628be67721cfc031e3) **backend_server.py**: handle all other client Exceptions in `_handle_connection()`
### Refactor
- [`8d2b8f9`](https://github.com/pufereq/template-repo/commit/8d2b8f9519bb809df45ba79ea53f12775c3097d4) **backend_server.py**: change log levels
- [`faf1f4e`](https://github.com/pufereq/template-repo/commit/faf1f4eeee341f5f8d234dc7d93ae5c86e276217) **backend_server.py**: remove unused argument in `BackendServer._send_outbound()`
- [`61a607c`](https://github.com/pufereq/template-repo/commit/61a607c20e205c18e60a9b26f6fb3c37a47d6a55) wip
### Styling
- [`f365139`](https://github.com/pufereq/template-repo/commit/f365139e9f064de309f655296b99868833ba7dce) **backend_server.py**: ignore type error in `_handle_connection()`
### Build
- [`fe7d78c`](https://github.com/pufereq/template-repo/commit/fe7d78c1c8cd1d0e13276ce82549ee97b896aff0) **uv.lock**: update judas_protocol to 0.5.0
- [`cee3025`](https://github.com/pufereq/template-repo/commit/cee30251ddb87b1f3ca84d0f3c8cf40fb37debcc) **uv.lock**: update judas_protocol to 0.4.3
- [`721ab87`](https://github.com/pufereq/template-repo/commit/721ab87e7156045703f55ecefc6ed3e15ffa36aa) **uv.lock**: update judas_protocol to 0.3.0
- [`1211ca2`](https://github.com/pufereq/template-repo/commit/1211ca20294dcc3907dbadfee4b294cf7e24a8f9) **uv.lock**: update judas_protocol to 0.2.0
## [0.3.0] - 2025-09-19
### Bug Fixes

View File

@@ -4,7 +4,7 @@ build-backend = "uv_build"
[project]
name = "judas_server"
version = "0.3.0"
version = "0.4.0"
description = "The backbone of the remote PC fleet management system."
readme = "README.md"
authors = []

View File

@@ -70,7 +70,7 @@ class BackendServer:
target_id (str): The id of the ACK'd message.
"""
ack: bytes = Message.ack(target_id=target_id).to_bytes()
self.logger.debug(f"[>] Sending ACK to {client}")
self.logger.info(f"[>] Sending ACK to {client}")
client.outbound += ack
def _accept_connection(self, sock: socket.socket) -> None:
@@ -128,7 +128,7 @@ class BackendServer:
Returns:
bytes: The received data.
"""
recv_data = sock.recv(1024)
recv_data = sock.recv(packet_size)
if recv_data:
self.logger.debug(
f"[<] Received data from {client}: {recv_data!r}"
@@ -195,9 +195,10 @@ class BackendServer:
)
self._disconnect(client)
return
while b"\n" in client.inbound:
line, client.inbound = client.inbound.split(b"\n", 1)
self.logger.info(
self.logger.debug(
f"[<] Complete message from {client}: {line!r}"
)
try:

2
uv.lock generated
View File

@@ -324,7 +324,7 @@ source = { git = "https://gitea.pufereq.pl/judas/judas_protocol.git#c48b69ecee16
[[package]]
name = "judas-server"
version = "0.3.0"
version = "0.4.0"
source = { editable = "." }
dependencies = [
{ name = "flask" },