Skip to content

Commit

Permalink
fix changestream
Browse files Browse the repository at this point in the history
  • Loading branch information
genekogan committed Jan 7, 2025
1 parent f3901e0 commit c5c0214
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eve/tools/comfyui_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from bson import ObjectId
from pydantic import BaseModel, Field
from typing import List, Optional, Dict
import asyncio

from ..mongo import get_collection
from ..tool import Tool
Expand Down Expand Up @@ -132,6 +131,8 @@ def convert_tasks2_to_tasks3():
with tasks2.watch(pipeline) as stream:
for change in stream:
task_id = change["documentKey"]["_id"]
if "updateDescription" not in change:
continue
update = change["updateDescription"]["updatedFields"]
task = Task.from_mongo(task_id)
task.reload()
Expand Down

0 comments on commit c5c0214

Please sign in to comment.