deadline rest api创建任务



import requests
def submit_job(url, job_info, plugin_info):
    """

    Args:
        url: http://127.0.0.1:8082
        job_info: {'key': 'values'}
        plugin_info: {'key': 'values'}

        Returns:

    """
    data = {
        'JobInfo': job_info,
        'PluginInfo': plugin_info,
        'AuxFiles': [],
        'IdOnly': False
    }

    result = requests.post(url + '/api/jobs', json=data)
    return str(result.text)

评论
  目录