-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmain.py
More file actions
28 lines (20 loc) · 804 Bytes
/
Copy pathmain.py
File metadata and controls
28 lines (20 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import json
import logging
import argparse
from pipeline.pipeline import Pipeline
def main(args: argparse.Namespace)-> None:
with open(args.config_path, "r") as file:
app_config = json.load(file)
logging.info("Building the pipeline")
pipeline = Pipeline(app_config,
protolib_path=args.protolib_path,
connection_string=args.connection_string)
logging.info("Starting pipeline")
pipeline.run()
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--config_path", required=True, type=str)
parser.add_argument("--protolib_path", required=True, type=str)
parser.add_argument("--connection_string", required=True, type=str)
args = parser.parse_args()
main(args)