""" Projections ETL Command Line Interface. All required methods to setup and execute the command line for projections related tasks are in here. """ from time import sleep from garcon.activity import ActivityWorker from garcon.decider import DeciderWorker from flows import config as base_config from flows.projections import config from flows.projections.flow import Flow def init_worker_parser(parser): """Setup the 'worker projections' sub-command to the cli. Args: parser (argparse.ArgumentParser): sub-command argument parser. """ pass def run_worker(): """CLI entry point to the 'worker projections' sub-command.""" worker = ActivityWorker(Flow( base_config.SWF_DOMAIN, config.SWF_WORKFLOW_NAME, config.SWF_WORKFLOW_VERSION)) worker.run() def init_decider_parser(parser): """Setup the 'decider projections' sub-command to the cli. Args: parser (argparse.ArgumentParser): sub-command argument parser. """ pass def run_decider(): """CLI entry point to the 'decider projections' sub-command.""" decider = DeciderWorker(Flow( base_config.SWF_DOMAIN, config.SWF_WORKFLOW_NAME, config.SWF_WORKFLOW_VERSION)) while True: decider.run() sleep(1)