From f4268e492e9a0090b388eecee8d11625ae71c6fb Mon Sep 17 00:00:00 2001 From: Nathaniel May Date: Fri, 15 Oct 2021 12:03:31 -0400 Subject: [PATCH] meh --- core/dbt/events/events.py | 26 ++++++++++++++++++++++++++ core/dbt/task/parse.py | 1 + 2 files changed, 27 insertions(+) create mode 100644 core/dbt/events/events.py diff --git a/core/dbt/events/events.py b/core/dbt/events/events.py new file mode 100644 index 00000000000..016d59cf012 --- /dev/null +++ b/core/dbt/events/events.py @@ -0,0 +1,26 @@ + + +class Singleton: + __instance = None + @staticmethod + def getInstance(): + """ Static access method. """ + if Singleton.__instance == None: + Singleton() + return Singleton.__instance + def __init__(self): + """ Virtually private constructor. """ + if Singleton.__instance != None: + raise Exception("This class is a singleton!") + else: + Singleton.__instance = self + + +# All classes that inherit from this one should be defined in this file. +class BaseEvent(): + pass + + +class StartParse(BaseEvent): + pass + diff --git a/core/dbt/task/parse.py b/core/dbt/task/parse.py index 985db062093..6f68df53b68 100644 --- a/core/dbt/task/parse.py +++ b/core/dbt/task/parse.py @@ -81,6 +81,7 @@ def compile_manifest(self): self.graph = compiler.compile(self.manifest) def run(self): + events.register(Progress(ParseStart)) print_timestamped_line('Start parsing.') self.get_full_manifest() if self.args.compile: