Source code for julee.services.temporal.proxies
"""
Workflow-safe proxy classes for the julee knowledge service domain.
This module contains @temporal_workflow_proxy decorated classes that
delegate to Temporal activities from within workflows. These classes are
isolated from backend imports to avoid Temporal's workflow sandbox
restrictions.
The proxy classes automatically generate methods that call
workflow.execute_activity() with the appropriate activity names, timeouts,
and retry policies.
"""
from julee.services.knowledge_service import KnowledgeService
# Import activity name bases from shared module
from julee.services.temporal.activity_names import (
KNOWLEDGE_SERVICE_ACTIVITY_BASE,
)
from julee.util.temporal.decorators import temporal_workflow_proxy
@temporal_workflow_proxy(
activity_base=KNOWLEDGE_SERVICE_ACTIVITY_BASE,
default_timeout_seconds=300, # 5 minutes for external service calls
retry_methods=["register_file", "execute_query"],
)
[docs]
class WorkflowKnowledgeServiceProxy(KnowledgeService):
"""
Workflow implementation of KnowledgeService that calls activities.
All methods are automatically generated by the @temporal_workflow_proxy
decorator.
"""
pass
# Export the workflow proxy classes
__all__ = [
"WorkflowKnowledgeServiceProxy",
]