Skip to content
Merged

Test #71

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ repos:

- repo: https://github.com/astral-sh/uv-pre-commit
# uv version.
rev: "0.9.4"
rev: "0.9.7"
hooks:
# Update the uv lockfile
- id: uv-lock

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.1
rev: v0.14.3
hooks:
# Run the linter.
- id: ruff
Expand All @@ -31,3 +31,9 @@ repos:
hooks:
- id: flake8
args: ["--config=.flake8"]

- repo: https://github.com/commitizen-tools/commitizen
rev: v4.9.1
hooks:
- id: commitizen
stages: [commit-msg]
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 1.2.1 (2025-11-06)

### Fix

- **websocket**: handle web.ClientError during message sending to prevent unhandled exceptions

### Refactor

- **tests**: remove unused data_path assignment in TestWorkerInitCases

## 1.2.0 (2025-11-05)

### Refactor
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "funcnodes-worker"
version = "1.2.0"
version = "1.2.1"
description = "Worker package for FuncNodes"
readme = "README.md"
authors = [{name = "Julian Kimmig", email = "julian.kimmig@linkdlab.de"}]
Expand Down
3 changes: 2 additions & 1 deletion src/funcnodes_worker/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ async def process_queue(self):
await asyncio.wait_for(self.ws.send_bytes(msg), timeout=2)
else:
await asyncio.wait_for(self.ws.send_str(msg), timeout=2)

except web.ClientError:
pass
except Exception as exc:
self.logger.exception("Error sending message", exc_info=exc)
finally:
Expand Down
1 change: 0 additions & 1 deletion tests/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class TestWorkerInitCases(TestCase):
def setUp(self):
fn_set_in_test()
self.tempdir = tempfile.TemporaryDirectory()
# self.workerkwargs["data_path"] = self.tempdir.name
self.workerkwargs["uuid"] = "testuuid"
self.worker = None

Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading