event_type.py 697 B

12345678910111213141516171819202122232425262728293031
  1. from __future__ import absolute_import
  2. from enum import Enum
  3. import logging
  4. log = logging.getLogger(__name__)
  5. class EventType(Enum):
  6. """ Various states/events that execution can result in or have tracked.
  7. These are most often accessed via :class:`hystrix.request_log.RequestLog`
  8. or :meth:`hystrix.command.Command.execution_events()`.
  9. """
  10. EMIT = 1
  11. SUCCESS = 2
  12. FAILURE = 3
  13. TIMEOUT = 4
  14. SHORT_CIRCUITED = 5
  15. THREAD_POOL_REJECTED = 6
  16. SEMAPHORE_REJECTED = 7
  17. FALLBACK_EMIT = 8
  18. FALLBACK_SUCCESS = 9
  19. FALLBACK_FAILURE = 10
  20. FALLBACK_REJECTION = 11
  21. EXCEPTION_THROWN = 12
  22. RESPONSE_FROM_CACHE = 13
  23. COLLAPSED = 14
  24. BAD_REQUEST = 15