-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #146 from MineralsCloud:docs
Update docs
- Loading branch information
Showing
8 changed files
with
183 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,34 @@ | ||
import ..Jobs: getstatus, pendingjobs, runningjobs, exitedjobs, failedjobs, interruptedjobs | ||
import ..Jobs: | ||
getstatus, | ||
pendingjobs, | ||
runningjobs, | ||
exitedjobs, | ||
succeededjobs, | ||
failedjobs, | ||
interruptedjobs | ||
|
||
export getstatus, pendingjobs, runningjobs, exitedjobs, failedjobs, interruptedjobs | ||
export getstatus, | ||
pendingjobs, runningjobs, exitedjobs, succeededjobs, failedjobs, interruptedjobs | ||
|
||
for method in | ||
(:getstatus, :pendingjobs, :runningjobs, :exitedjobs, :failedjobs, :interruptedjobs) | ||
""" | ||
getstatus(wf::Workflow) | ||
Get the current status of `Job`s in a `Workflow`. | ||
""" | ||
getstatus(wf::Workflow) = getstatus(wf.jobs) | ||
getstatus(wf::SavedWorkflow) = getstatus(wf.wf) | ||
|
||
# See https://docs.julialang.org/en/v1/manual/documentation/#Advanced-Usage | ||
for func in | ||
(:pendingjobs, :runningjobs, :exitedjobs, :succeededjobs, :failedjobs, :interruptedjobs) | ||
name = string(func) | ||
@eval begin | ||
$method(wf::Workflow) = $method(wf.jobs) | ||
$method(wf::SavedWorkflow) = $method(wf.wf) | ||
""" | ||
$($name)(wf::Workflow) | ||
Filter only the pending jobs in a `Workflow`. | ||
""" | ||
$func(wf::Workflow) = $func(wf.jobs) | ||
$func(wf::SavedWorkflow) = $func(wf.wf) | ||
end | ||
end |