Skip to content

Commit

Permalink
Add the missing restart keyword to the specification docs. (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
koning authored Jan 19, 2024
1 parent b9afbdb commit 642f925
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- The `merlin status` command so that it's consistent in its output whether using redis or rabbitmq as the broker
- The `merlin monitor` command will now keep an allocation up if the queues are empty and workers are still processing tasks
- Add the restart keyword to the specification docs

## [1.11.1]
### Fixed
Expand Down
14 changes: 13 additions & 1 deletion docs/source/merlin_specification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ see :doc:`./merlin_variables`.
# The $(LAUNCHER) macro can be used to substitute a parallel launcher
# based on the batch:type:.
# It will use the nodes and procs values for the task.
# restart: The (optional) restart command to run when $(MERLIN_RESTART)
# is the exit code. The command in cmd will be run if the exit code
# is $(MERLIN_RETRY).
# task_queue: the queue to assign the step to (optional. default: merlin)
# shell: the shell to use for the command (eg /bin/bash /usr/bin/env python)
# (optional. default: /bin/bash)
Expand Down Expand Up @@ -156,6 +159,8 @@ see :doc:`./merlin_variables`.
cmd: |
cd $(runs1.workspace)/$(MERLIN_SAMPLE_PATH)
<post-process>
# exit $(MERLIN_RESTART) # syntax to send a restart error code
# This will rerun the cmd command. Users can also use $(MERLIN_RETRY).
nodes: 1
procs: 1
depends: [runs1]
Expand All @@ -167,7 +172,14 @@ see :doc:`./merlin_variables`.
cmd: |
touch learnrun.out
$(LAUNCHER) echo "$(VAR1) $(VAR2)" >> learnrun.out
exit $(MERLIN_RETRY) # some syntax to send a retry error code
exit $(MERLIN_RESTART) # syntax to send a restart error code
# exit $(MERLIN_RETRY) # syntax to send a retry error code to
# run the cmd command again instead of the restart command.
restart: |
# Command to run if the $(MERLIN_RESTART) exit code is used
touch learnrunrs.out
$(LAUNCHER) echo "$(VAR1) $(VAR2)" >> learnrunrs.out
exit $(MERLIN_SUCCESS) # syntax to send a success code
nodes: 1
procs: 1
task_queue: lqueue
Expand Down

0 comments on commit 642f925

Please sign in to comment.