From ce386a7a1f38c2c6289ce9d0bde269b4b1349154 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 15 Jul 2022 13:07:10 -0700 Subject: row2json script: add flag to enable recrawling --- python/scripts/ingestrequest_row2json.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/python/scripts/ingestrequest_row2json.py b/python/scripts/ingestrequest_row2json.py index d52e793..0a457cd 100755 --- a/python/scripts/ingestrequest_row2json.py +++ b/python/scripts/ingestrequest_row2json.py @@ -33,13 +33,20 @@ def run(args): req = transform(json.loads(l)) except: print(l, file=sys.stderr) + if args.force_recrawl: + req["force_recrawl"] = True print(json.dumps(req, sort_keys=True)) def main(): parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument( - "json_file", help="arabesque output file to use", type=argparse.FileType("r") + "json_file", help="SQL output JSON file to process", type=argparse.FileType("r") + ) + parser.add_argument( + "force_recrawl", + action="store_true", + help="whether to add recrawl (SPNv2) flag to request", ) subparsers = parser.add_subparsers() -- cgit v1.2.3