Keep flow state across a restart, and tighten the flow typing
The engine fell back to MemoryState because there was no Redis to talk to, so every value was lost on restart. Adds a redis service with append-only persistence, reachable only from the backend, and points REDIS_HOST at it. state.py and pipeline.py leave the strict-mypy exclusion. redis-py types its calls as sync/async unions; the casts narrow that at the points of use rather than switching to redis.asyncio, which would make a deliberately synchronous backend asynchronous. nodes.py stays excluded. The .env.example CORS entry belongs with the CI work that follows. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KkmeRiyeYmVZqJVwuyHq9o
This commit is contained in:
co-authored by
Claude Opus 5
parent
82356810ce
commit
11d491dae0
@@ -44,11 +44,11 @@ build-backend = "hatchling.build"
|
||||
strict = true
|
||||
exclude = ["venv", ".venv", "alembic"]
|
||||
|
||||
# app/flow/nodes.py still carries the prototype's node classes, and state.py's
|
||||
# redis calls type as sync/async unions under the current stubs. Both are being
|
||||
# revisited; every module around them is checked strictly.
|
||||
# app/flow/nodes.py still carries the prototype's node classes: the integration
|
||||
# nodes need annotations of their own, plus stubs for croniter and influxdb_client.
|
||||
# It is being revisited per integration; every module around it is checked strictly.
|
||||
[[tool.mypy.overrides]]
|
||||
module = ["app.flow.nodes", "app.flow.pipeline", "app.flow.state"]
|
||||
module = ["app.flow.nodes"]
|
||||
ignore_errors = true
|
||||
|
||||
[tool.ruff]
|
||||
|
||||
Reference in New Issue
Block a user