Files
app/backend/app/flow/nodes/notify_test.py
T
Melvin StroblandClaude Opus 5 1916f7f778 Vendor backend and frontend into the monorepo
The submodule collapse was only half applied: .gitmodules was deleted but
backend/ and frontend/ were still recorded as gitlinks, so none of their
files were tracked. Replace the gitlinks with the real trees.

Also untrack .env (it carried placeholder secrets) in favour of a tracked
.env.example, drop the committed __pycache__, and narrow the blanket *.png
ignore that would have swallowed design assets.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-09 15:14:54 +02:00

31 lines
816 B
Python

from nodes import Node
from util import Message
import logging
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
)
logger = logging.getLogger(__name__)
def create_node(params: dict) -> Node:
def check_power(params, random_value_rec_rate_delayed: int, **kwargs):
threshold = params.get("alert_threshold", 1000.0)
if random_value_rec_rate_delayed > 50:
logger.info(f"[alert_node] ⚠️ Input >50")
else:
logger.info(f"[alert_node] ✓ Input < 50")
return Node(
f=check_power,
requires=[
Message(name="random_value_rec_rate_delayed", dtype=int),
],
provides=[], # Using object for optional string
params=params,
name="notify",
)