Files
DataMate/runtime/python-executor/datamate/wrappers/datamate_wrapper.py
2025-10-21 23:00:48 +08:00

16 lines
411 B
Python

# -*- coding: utf-8 -*-
import os
from datamate.scheduler import cmd_scheduler
async def submit(task_id, config_path):
current_dir = os.path.dirname(__file__)
await cmd_scheduler.submit(task_id, f"python {os.path.join(current_dir, 'datamate_executor.py')} "
f"--config_path={config_path}")
def cancel(task_id):
return cmd_scheduler.cancel_task(task_id)