Skip to content

Commit acb9c17

Browse files
committed
Added an option to only resume pending commands
1 parent 6cd35aa commit acb9c17

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/smart_dispatch.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ def main():
7777
if not utils.yes_no_prompt("Do you want to continue?", 'n'):
7878
exit()
7979

80-
command_manager.reset_running_commands()
80+
if not args.only_pending:
81+
command_manager.reset_running_commands()
82+
8183
nb_commands = command_manager.get_nb_commands_to_run()
8284

8385
# If no pool size is specified the number of commands is taken
@@ -142,6 +144,7 @@ def parse_arguments():
142144
launch_parser.add_argument("commandAndOptions", help="Options for the commands.", nargs=argparse.REMAINDER)
143145

144146
resume_parser = subparsers.add_parser('resume', help="Resume jobs from batch UID.")
147+
resume_parser.add_argument('--only_pending', action='store_true', help='Resume only pending commands.')
145148
resume_parser.add_argument("batch_uid", help="Batch UID of the jobs to resume.")
146149

147150
args = parser.parse_args()

0 commit comments

Comments
 (0)