Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

[FIX] Fix HITL review screen showing "Never expires" despite TTL being set (#1785)

vishnuszipstack435c6cffd65f
diff --git a/backend/plugins/workflow_manager/workflow_v2/utils.py b/backend/plugins/workflow_manager/workflow_v2/utils.py
index fa8a36bcb..f65842ca2 100644
--- a/backend/plugins/workflow_manager/workflow_v2/utils.py
+++ b/backend/plugins/workflow_manager/workflow_v2/utils.py
@@ -134,5 +134,11 @@ class WorkflowUtil:
Optional[int]: TTL in seconds if custom TTL is set, None for unlimited TTL.
For OSS version, always returns None (unlimited TTL).
"""
- # TTL feature is cloud-only, return None for unlimited TTL in OSS
- return None
+ try:
+ from pluggable_apps.manual_review_v2.helper import (
+ get_hitl_ttl_seconds_by_workflow,
+ )
+
+ return get_hitl_ttl_seconds_by_workflow(workflow)
+ except ImportError:
+ return None
diff --git a/backend/workflow_manager/endpoint_v2/destination.py b/backend/workflow_manager/endpoint_v2/destination.py
index f86f76827..0e63e129a 100644
--- a/backend/workflow_manager/endpoint_v2/destination.py
+++ b/backend/workflow_manager/endpoint_v2/destination.py
@@ -1041,6 +1041,7 @@ class DestinationConnector(BaseConnector):
input_file_path, file_name
)
q_name = self._get_review_queue_name()
+ ttl_seconds = WorkflowUtil.get_hitl_ttl_seconds(self.workflow)
queue_result = self._create_queue_result(
file_name=file_name,
@@ -1048,11 +1049,12 @@ class DestinationConnector(BaseConnector):
file_content_base64=file_content_base64,
file_execution_id=file_execution_id,
meta_data=meta_data,
+ ttl_seconds=ttl_seconds,
)
queue_result_json = json.dumps(queue_result)
self._enqueue_to_packet_or_regular_queue(
- file_name, queue_result, queue_result_json, q_name
+ file_name, queue_result, queue_result_json, q_name, ttl_seconds
)
def _push_to_queue_for_connector(