MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / create_task

Method create_task

src/core/database.py:1156–1165  ·  view source on GitHub ↗

Create a new task

(self, task: Task)

Source from the content-addressed store, hash-verified

1154
1155 # Task operations
1156 async def create_task(self, task: Task) -> int:
1157 """Create a new task"""
1158 async with self._connect(write=True) as db:
1159 cursor = await db.execute("""
1160 INSERT INTO tasks (task_id, token_id, model, prompt, status, progress, scene_id)
1161 VALUES (?, ?, ?, ?, ?, ?, ?)
1162 """, (task.task_id, task.token_id, task.model, task.prompt,
1163 task.status, task.progress, task.scene_id))
1164 await db.commit()
1165 return cursor.lastrowid
1166
1167 async def get_task(self, task_id: str) -> Optional[Task]:
1168 """Get task by ID"""

Callers 15

lifespanFunction · 0.80
patched_sendFunction · 0.80
get_instanceMethod · 0.80
_rebuild_resident_tabMethod · 0.80
initializeMethod · 0.80
_ensure_workersMethod · 0.80

Calls 1

_connectMethod · 0.95