Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/dependency #308

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Dev/dependency #308

wants to merge 1 commit into from

Conversation

NamelessOIer
Copy link
Collaborator

@NamelessOIer NamelessOIer commented Aug 6, 2024

提交时指定任务在某些任务达成某一状态后才能启动,示例:
cbatch test.sh -d=afterany:1
表示当前任务test.sh必须在编号为1的任务结束(包括取消、超时、失败、运行完成)后开始。

目前支持的依赖类型:

  • after:在依赖任务开始或取消后才能开始
  • afterok:在依赖任务已0的返回值运行结束后才能开始
  • afternotok:在依赖任务结束但并非成功运行后开始(包括返回值不为0)
  • afterany:在依赖任务已任何原因结束后才能开始

一个任务可以依赖多个任务,要么要求达成全部条件,要么要求达成其中一个,两种情况分别使用,?分隔要求,示例:
cbatch test.sh -d=afterany:1,after:2:要求在任务1结束且任务2已经开始或取消后才能启动
cbatch test.sh -d=afterany:1?after:2:要求在任务1结束或任务2已经开始或取消后才能启动

当依赖条件相同时,允许简写,用:分隔依赖任务编号,示例:
cbatch test.sh -d=afterany:1:2,after:3:要求在任务1、2全部结束且任务3已经开始或取消后才能启动
cbatch test.sh -d=afterany:1:2?after:3:要求在任务1、2其中之一结束或任务3已经开始或取消后才能启动
当没有使用,?分隔时,默认为需要全部满足。

对于 calloc 退出总视为运行成功,cbatch 和 crun 任务正常判别返回值。

@L-Xiafeng L-Xiafeng linked an issue Nov 6, 2024 that may be closed by this pull request
@L-Xiafeng L-Xiafeng added the enhancement New feature or request label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

增加作业dependency的功能
2 participants