From bc6a46a40ad534ce3a37e7e9a1df3351e8c98f24 Mon Sep 17 00:00:00 2001 From: Matt <16054364+matt-159@users.noreply.github.com> Date: Wed, 21 Sep 2022 13:25:29 -0700 Subject: [PATCH] added argument to allow for resuming failed batch headlessly --- __init__.py | 8 ++++++++ main/headless_util.py | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/__init__.py b/__init__.py index 3d54bba..3430a82 100644 --- a/__init__.py +++ b/__init__.py @@ -352,6 +352,14 @@ def run_as_headless(): if args.batch_data_path: input.batch_json_save_path = args.batch_data_path + if args.resume_failed_batch: + _fail_state, _failed_batch, _failed_dna, _failed_dna_index = helpers.check_failed_batches(_batch_json_save_path) + + input.fail_state=_fail_state, + input.failed_batch=_failed_batch, + input.failed_dna=_failed_dna, + input.failed_dna_index=_failed_dna_index, + if args.operation == 'create-dna': intermediate.send_to_record(input) diff --git a/main/headless_util.py b/main/headless_util.py index dbe0f6e..3791373 100644 --- a/main/headless_util.py +++ b/main/headless_util.py @@ -65,4 +65,10 @@ def get_python_args(): help="Overwrite the logic file path in the config file" ) + parser.add_argument("--resume-failed-batch", + dest="resume_failed_batch", + type=bool, + required=False, + help="Resume failed batch" + ) return parser.parse_args(argv), parser