本文整理匯總了Python中API.API.add_task方法的典型用法代碼示例。如果您正苦於以下問題:Python API.add_task方法的具體用法?Python API.add_task怎麽用?Python API.add_task使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類API.API
的用法示例。
在下文中一共展示了API.add_task方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: add_task
# 需要導入模塊: from API import API [as 別名]
# 或者: from API.API import add_task [as 別名]
def add_task(self, id=None, name=None, state=None, tag=None, dependency=None, parent_job=None, removed_parent_defaults=None,
image=None, command=None, entrypoint=None, cron=None, restartable=None, exitcodes=None, max_failures=None, delay=None,
faildelay=None, environment=None, datavolumes=None, port=None, description=None):
""" """
if id:
return API.update_task(id=id, name=name, state=state, tag=tag, dependency=dependency, parent_job=parent_job, removed_parent_defaults=removed_parent_defaults,
image=image, command=command, entrypoint=entrypoint, cron=cron, restartable=restartable, exitcodes=exitcodes, max_failures=max_failures, delay=delay, faildelay=faildelay,
environment=environment, datavolumes=datavolumes, port=port, description=description)
else:
return API.add_task(name=name, state=state, tag=tag, dependency=dependency, parent_job=parent_job, removed_parent_defaults=removed_parent_defaults,
image=image, command=command, entrypoint=entrypoint, cron=cron, restartable=restartable, exitcodes=exitcodes, max_failures=max_failures, delay=delay, faildelay=faildelay,
environment=environment, datavolumes=datavolumes, port=port, description=description)