Register dog effect for DAG EFFECT nodes
The EFFECT node executor uses register_effect() to look up effects. Added dog effect registration so DAG recipes can use effect: dog. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
9
tasks.py
9
tasks.py
@@ -22,6 +22,7 @@ from celery_app import app
|
|||||||
from artdag import DAG, Node, NodeType
|
from artdag import DAG, Node, NodeType
|
||||||
from artdag.engine import Engine
|
from artdag.engine import Engine
|
||||||
from artdag.executor import register_executor, Executor, get_executor
|
from artdag.executor import register_executor, Executor, get_executor
|
||||||
|
from artdag.nodes.effect import register_effect
|
||||||
import artdag.nodes # Register all built-in executors (SOURCE, EFFECT, etc.)
|
import artdag.nodes # Register all built-in executors (SOURCE, EFFECT, etc.)
|
||||||
|
|
||||||
# Add effects to path (use env var in Docker, fallback to home dir locally)
|
# Add effects to path (use env var in Docker, fallback to home dir locally)
|
||||||
@@ -65,6 +66,14 @@ def get_artdag_commit() -> str:
|
|||||||
|
|
||||||
sys.path.insert(0, str(EFFECTS_PATH / "dog"))
|
sys.path.insert(0, str(EFFECTS_PATH / "dog"))
|
||||||
|
|
||||||
|
# Register the dog effect with the EFFECT executor
|
||||||
|
from effect import effect_dog
|
||||||
|
|
||||||
|
@register_effect("dog")
|
||||||
|
def _dog_effect(input_path: Path, output_path: Path, config: dict) -> Path:
|
||||||
|
"""Dog effect wrapper - registered for DAG EFFECT nodes."""
|
||||||
|
return effect_dog(input_path, output_path, config)
|
||||||
|
|
||||||
|
|
||||||
def file_hash(path: Path) -> str:
|
def file_hash(path: Path) -> str:
|
||||||
"""Compute SHA3-256 hash of a file."""
|
"""Compute SHA3-256 hash of a file."""
|
||||||
|
|||||||
Reference in New Issue
Block a user