event_notifier_default.py 498 B

123456789101112131415161718192021
  1. from __future__ import absolute_import
  2. import logging
  3. from hystrix.strategy.eventnotifier.event_notifier import AbstractBaseEventNotifier
  4. log = logging.getLogger(__name__)
  5. class EventNotifierDefault(AbstractBaseEventNotifier):
  6. """
  7. Default implementations of :class:`AbstractBaseEventNotifier` that does nothing.
  8. """
  9. INSTANCE = None
  10. @classmethod
  11. def get_instance(klass):
  12. if not klass.INSTANCE:
  13. klass.INSTANCE = klass()
  14. return klass.INSTANCE