# Path: botoflow/core/async_traceback.py
# def print_exc(limit=None, file=None):
# def format_exc(limit=None, exception=None, tb_list=None):
# def extract_tb(limit=None):


import os
import socket
import threading
import logging
from copy import copy
from botocore.session import Session
from ..core import async_traceback
        from .. import __version__
        """
        if self._identity is None:
            self._identity = "%d:%s" % (os.getpid(), socket.gethostname())
        return self._identity

    @identity.setter
    def identity(self, value):
        self._identity = value

    def run(self):
        """Should be implemented by the worker

        :raises: NotImplementedError
        """
        raise NotImplementedError()

    def run_once(self):
        """Should be implemented by the worker

        :raises: NotImplementedError
        """
        raise NotImplementedError()

    @staticmethod
    def _unhandled_exception_handler(exc, tb_list):
        """Handler notified about poll request and other unexpected failures.

        This default implementation logs the failures using ERROR level.
        """
        thread_name = threading.current_thread().name

# Path: botoflow/core/async_traceback.py
# def print_exc(limit=None, file=None):
# def format_exc(limit=None, exception=None, tb_list=None):
# def extract_tb(limit=None):


# Path: botoflow/workers/base_worker.py
import os
import socket
import threading
import logging
from copy import copy
from botocore.session import Session
from ..core import async_traceback
        from .. import __version__

        """
        if self._identity is None:
            self._identity = "%d:%s" % (os.getpid(), socket.gethostname())
        return self._identity

    @identity.setter
    def identity(self, value):
        self._identity = value

    def run(self):
        """Should be implemented by the worker

        :raises: NotImplementedError
        """
        raise NotImplementedError()

    def run_once(self):
        """Should be implemented by the worker

        :raises: NotImplementedError
        """
        raise NotImplementedError()

    @staticmethod
    def _unhandled_exception_handler(exc, tb_list):
        """Handler notified about poll request and other unexpected failures.

        This default implementation logs the failures using ERROR level.
        """
        thread_name = threading.current_thread().name

        tb_str = async_traceback.format_exc(None, exc, tb_list)