Skip to content

Commit 9a5c7b0

Browse files
committed
fix: IngestionWorkflow pipeline!
1 parent b791eab commit 9a5c7b0

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

hivemind_etl/simple_ingestion/pipeline.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
from datetime import timedelta
22

3-
from temporalio import workflow
3+
from temporalio import activity,workflow
44
from temporalio.common import RetryPolicy
55
from temporalio.workflow import execute_activity
66
from .schema import IngestionRequest
7-
from tc_hivemind_backend.ingest_qdrant import CustomIngestionPipeline
8-
from llama_index.core import Document
7+
8+
with workflow.unsafe.imports_passed_through():
9+
from tc_hivemind_backend.ingest_qdrant import CustomIngestionPipeline
10+
from llama_index.core import Document
911

1012

1113
@workflow.defn
@@ -48,7 +50,7 @@ async def run(self, ingestion_request: IngestionRequest) -> None:
4850
)
4951

5052

51-
@workflow.activity
53+
@activity.defn
5254
async def process_document(
5355
ingestion_request: IngestionRequest,
5456
) -> None:
@@ -75,7 +77,7 @@ async def process_document(
7577
# Initialize the ingestion pipeline
7678
pipeline = CustomIngestionPipeline(
7779
community_id=ingestion_request.communityId,
78-
collectionName=collection_name,
80+
collection_name=collection_name,
7981
)
8082

8183
document = Document(

0 commit comments

Comments
 (0)