123456789101112131415161718192021222324 |
- import time
- import requests
- from config import *
- with open('./hive2hive.json', 'r') as f:
- script_str = f.read()
- cmd_parameter = '-j "-Xms2G -Xmx2G" -p "-Dct=hangzhou" '
- name = f'datax_task_{int(time.time())}'
- data = {
- "name": name,
- "file_urls": [],
- "script": script_str,
- # "cmd": "echo 'hello'",
- "cmd_parameters": cmd_parameter,
- "envs": {},
- "run_image": "SXKJ:32775/pod_datax:0.9",
- "task_type": "datax",
- "user_id": 33
- }
- print(f'http://{host}/jpt/jpt_task')
|