From 87c6bf87188f69531bbd9715fa2c5b62db5ced0c Mon Sep 17 00:00:00 2001 From: Jake Pullen Date: Sat, 10 Aug 2024 17:34:50 +0100 Subject: [PATCH] added log for start and end of pipeline --- main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 17a089d..b897ce8 100644 --- a/main.py +++ b/main.py @@ -55,6 +55,8 @@ def main(): config['API_TOKEN'] = API_TOKEN config['BUDGET_ID'] = BUDGET_ID + logging.info('Starting data pipeline') + Ingest(config) RawToBase(config) DimAccounts(config) @@ -64,10 +66,13 @@ def main(): FactTransactions(config) FactScheduledTransactions(config) + logging.info('Data pipeline completed successfully') + sys.exit(ec.SUCCESS) + if __name__ == '__main__': try: main() except SystemExit as e: exit_code = e.code logging.error(f'Program exited with code {exit_code}') - raise \ No newline at end of file + raise