Skip to content

Commit d20ae90

Browse files
authored
Merge pull request #44 from common-workflow-language/kg-fix-timelimit
Move TimeLimit individually to CommandLineTool as ToolTimeLimit
2 parents 0423299 + 4a16a24 commit d20ae90

File tree

6 files changed

+30
-31
lines changed

6 files changed

+30
-31
lines changed

CommandLineTool.yml

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ $graph:
8888
* Added `InputParameter.loadContents` field. Use of `loadContents` in
8989
`InputBinding` is deprecated; it is preserved for v1.0 backwards
9090
compatability and will be removed in CWL v2.0.
91-
* [Added](#TimeLimit) `TimeLimit` feature, allowing to set an upper limit on the
92-
execution time of a CommandLineTool or ExpressionTool.
91+
* [Added](#ToolTimeLimit) `ToolTimeLimit` feature, allows setting
92+
an upper limit on the execution time of a CommandLineTool.
9393
* [Added](#WorkReuse) `WorkReuse` feature, allowing to enable or disable the reuse
9494
behavior for a particular tool or step for implementations that
9595
support reusing output from past work.
@@ -1097,29 +1097,6 @@ $graph:
10971097
doc: Maximum reserved filesystem based storage for the designated output directory, in mebibytes (2**20)
10981098

10991099

1100-
- type: record
1101-
name: TimeLimit
1102-
extends: ProcessRequirement
1103-
doc: |
1104-
Set an upper limit on the execution time of a process
1105-
(e.g. a CommandLineTool or a Workflow). A process whose
1106-
execution duration exceeds the time limit may be
1107-
preemptively terminated and considered failed. May also be
1108-
used by batch systems to make scheduling decisions.
1109-
fields:
1110-
- name: class
1111-
type: string
1112-
doc: "Always 'TimeLimit'"
1113-
jsonldPredicate:
1114-
"_id": "@type"
1115-
"_type": "@vocab"
1116-
- name: timelimit
1117-
type: [long, string, Expression]
1118-
doc: |
1119-
The time limit, in seconds. A time limit of zero means no
1120-
time limit. Negative time limits are an error.
1121-
1122-
11231100
- type: record
11241101
name: WorkReuse
11251102
extends: ProcessRequirement
@@ -1219,3 +1196,27 @@ $graph:
12191196
"_type": "@vocab"
12201197
inplaceUpdate:
12211198
type: boolean
1199+
1200+
- type: record
1201+
name: ToolTimeLimit
1202+
extends: ProcessRequirement
1203+
doc: |
1204+
Set an upper limit on the execution time of a CommandLineTool.
1205+
A CommandLineTool whose execution duration exceeds the time
1206+
limit may be preemptively terminated and considered failed.
1207+
May also be used by batch systems to make scheduling decisions.
1208+
The execution duration excludes external operations, such as
1209+
staging of files, pulling a docker image etc, and only counts
1210+
wall-time for the execution of the command line itself.
1211+
fields:
1212+
- name: class
1213+
type: string
1214+
doc: "Always 'ToolTimeLimit'"
1215+
jsonldPredicate:
1216+
"_id": "@type"
1217+
"_type": "@vocab"
1218+
- name: timelimit
1219+
type: [long, string, Expression]
1220+
doc: |
1221+
The time limit, in seconds. A time limit of zero means no
1222+
time limit. Negative time limits are an error.

Workflow.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ $graph:
7777
* `secondaryFiles` can now be explicitly marked as `required` or not.
7878
* Add note that undefined details related to execution are left open to
7979
the platform.
80-
* [Added](#TimeLimit) `TimeLimit` feature, allowing to set an upper limit on the
81-
execution time of a CommandLineTool or ExpressionTool.
8280
* [Added](#WorkReuse) `WorkReuse` feature, allowing to enable or disable the reuse
8381
behavior for a particular tool or step for implementations that
8482
support reusing output from past work.

tests/timelimit.cwl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ cwlVersion: v1.1.0-dev1
33
inputs: []
44
outputs: []
55
requirements:
6-
TimeLimit:
6+
ToolTimeLimit:
77
timelimit: 3
88
baseCommand: [sleep, "15"]

tests/timelimit2.cwl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ cwlVersion: v1.1.0-dev1
33
inputs: []
44
outputs: []
55
requirements:
6-
TimeLimit:
6+
ToolTimeLimit:
77
timelimit: -1
88
baseCommand: [sleep, "15"]

tests/timelimit3.cwl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ cwlVersion: v1.1.0-dev1
33
inputs: []
44
outputs: []
55
requirements:
6-
TimeLimit:
6+
ToolTimeLimit:
77
timelimit: 0
88
baseCommand: [sleep, "15"]

tests/timelimit4.cwl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ inputs: []
44
outputs: []
55
requirements:
66
InlineJavascriptRequirement: {}
7-
TimeLimit:
7+
ToolTimeLimit:
88
timelimit: $(1+2)
99
baseCommand: [sleep, "15"]

0 commit comments

Comments
 (0)