diff --git a/python_apps/media-monitor2/media/saas/airtimeinstance.py b/python_apps/media-monitor2/media/saas/airtimeinstance.py index 67e7f8beb..5d02cd8e4 100644 --- a/python_apps/media-monitor2/media/saas/airtimeinstance.py +++ b/python_apps/media-monitor2/media/saas/airtimeinstance.py @@ -50,15 +50,19 @@ class AirtimeInstance(object): def mm_config(self): return MMConfig(self.config_paths['media_monitor']) - @LazyProperty - def owner(self): - return Owner() + # NOTE to future code monkeys: + # I'm well aware that I'm using the shitty service locator pattern + # instead of normal constructor injection as I should be. The reason + # for this is that I found these issues a little too close to the + # end of my tenure. It's highly recommended to rewrite this crap + # using proper constructor injection if you ever have the time @LazyProperty - def event_registry(self): - return EventRegistry() + def owner(self): return Owner() @LazyProperty - def file_mediator(self): - return FileMediator() + def event_registry(self): return EventRegistry() + + @LazyProperty + def file_mediator(self): return FileMediator()