Did I find the right examples for you? yes no

All Samples(383)  |  Call(336)  |  Derive(0)  |  Import(47)

src/t/u/tuskar-0.4.1/tuskar/openstack/common/rpc/impl_zmq.py   tuskar(Download)
 
from tuskar.openstack.common import excutils
from tuskar.openstack.common.gettextutils import _
from tuskar.openstack.common import importutils
from tuskar.openstack.common import jsonutils
    except TypeError:
        with excutils.save_and_reraise_exception():
            LOG.error(_("JSON serialization failed."))
 
 
def _deserialize(data):
    """
    Deserialization wrapper
    """
    LOG.debug(_("Deserializing: %s"), data)
                    'subscribe': subscribe, 'bind': bind}
 
        LOG.debug(_("Connecting to %(addr)s with %(type)s"), str_data)
        LOG.debug(_("-> Subscribed to %(subscribe)s"), str_data)
        LOG.debug(_("-> bind: %(bind)s"), str_data)

src/t/u/tuskar-0.4.1/tuskar/common/exception.py   tuskar(Download)
import six
 
from tuskar.openstack.common.gettextutils import _  # noqa
from tuskar.openstack.common import log as logging
 
 
        if description is None:
            description = _('Unexpected error while running command.')
        if exit_code is None:
            exit_code = '-'
        message = _('%(description)s\nCommand: %(cmd)s\n'
 
    """
    message = _("An unknown exception occurred.")
    code = 500
    headers = {}
                # kwargs doesn't match a variable in the message
                # log the issue and the kwargs
                LOG.exception(_('Exception in string format operation'))
                for name, value in kwargs.iteritems():
                    LOG.error("%s: %s" % (name, value))

src/t/u/tuskar-HEAD/tuskar/openstack/common/rpc/impl_zmq.py   tuskar(Download)
 
from tuskar.openstack.common import excutils
from tuskar.openstack.common.gettextutils import _
from tuskar.openstack.common import importutils
from tuskar.openstack.common import jsonutils
    except TypeError:
        with excutils.save_and_reraise_exception():
            LOG.error(_("JSON serialization failed."))
 
 
def _deserialize(data):
    """
    Deserialization wrapper
    """
    LOG.debug(_("Deserializing: %s"), data)
                    'subscribe': subscribe, 'bind': bind}
 
        LOG.debug(_("Connecting to %(addr)s with %(type)s"), str_data)
        LOG.debug(_("-> Subscribed to %(subscribe)s"), str_data)
        LOG.debug(_("-> bind: %(bind)s"), str_data)

src/t/u/tuskar-0.4.1/tuskar/openstack/common/rpc/common.py   tuskar(Download)
import six
 
from tuskar.openstack.common.gettextutils import _
from tuskar.openstack.common import importutils
from tuskar.openstack.common import jsonutils
class RPCException(Exception):
    message = _("An unknown RPC related exception occurred.")
 
    def __init__(self, message=None, **kwargs):
        self.kwargs = kwargs
                # kwargs doesn't match a variable in the message
                # log the issue and the kwargs
                LOG.exception(_('Exception in string format operation'))
                for name, value in kwargs.iteritems():
                    LOG.error("%s: %s" % (name, value))
 
    """
    message = _("Remote error: %(exc_type)s %(value)s\n%(traceback)s.")
 
    def __init__(self, exc_type=None, value=None, traceback=None):
    waiting for a response from the remote side.
    """
    message = _('Timeout while waiting on RPC response - '
                'topic: "%(topic)s", RPC method: "%(method)s" '
                'info: "%(info)s"')

src/t/u/tuskar-HEAD/tuskar/openstack/common/rpc/common.py   tuskar(Download)
import six
 
from tuskar.openstack.common.gettextutils import _
from tuskar.openstack.common import importutils
from tuskar.openstack.common import jsonutils
class RPCException(Exception):
    message = _("An unknown RPC related exception occurred.")
 
    def __init__(self, message=None, **kwargs):
        self.kwargs = kwargs
                # kwargs doesn't match a variable in the message
                # log the issue and the kwargs
                LOG.exception(_('Exception in string format operation'))
                for name, value in kwargs.iteritems():
                    LOG.error("%s: %s" % (name, value))
 
    """
    message = _("Remote error: %(exc_type)s %(value)s\n%(traceback)s.")
 
    def __init__(self, exc_type=None, value=None, traceback=None):
    waiting for a response from the remote side.
    """
    message = _('Timeout while waiting on RPC response - '
                'topic: "%(topic)s", RPC method: "%(method)s" '
                'info: "%(info)s"')

src/t/u/tuskar-0.4.1/tuskar/openstack/common/service.py   tuskar(Download)
 
from tuskar.openstack.common import eventlet_backdoor
from tuskar.openstack.common.gettextutils import _
from tuskar.openstack.common import importutils
from tuskar.openstack.common import log as logging
    def wait(self):
        signal.signal(signal.SIGTERM, self._handle_signal)
        signal.signal(signal.SIGINT, self._handle_signal)
 
        LOG.debug(_('Full set of CONF:'))
            signame = {signal.SIGTERM: 'SIGTERM',
                       signal.SIGINT: 'SIGINT'}[exc.signo]
            LOG.info(_('Caught %s, exiting'), signame)
            status = exc.code
        except SystemExit as exc:
        self.readpipe.read()
 
        LOG.info(_('Parent process has died unexpectedly, exiting'))
 
        sys.exit(1)
            # die instantly too quickly.
            if time.time() - wrap.forktimes[0] < wrap.workers:
                LOG.info(_('Forking too fast, sleeping'))
                time.sleep(1)
 

src/t/u/tuskar-0.4.1/tuskar/openstack/common/lockutils.py   tuskar(Download)
 
from tuskar.openstack.common import fileutils
from tuskar.openstack.common.gettextutils import _, _LE, _LI
from tuskar.openstack.common import log as logging
 
                    time.sleep(0.01)
                else:
                    raise threading.ThreadError(_("Unable to acquire lock on"
                                                  " `%(filename)s` due to"
                                                  " %(exception)s") %

src/t/u/tuskar-HEAD/tuskar/openstack/common/service.py   tuskar(Download)
 
from tuskar.openstack.common import eventlet_backdoor
from tuskar.openstack.common.gettextutils import _
from tuskar.openstack.common import importutils
from tuskar.openstack.common import log as logging
    def wait(self):
        signal.signal(signal.SIGTERM, self._handle_signal)
        signal.signal(signal.SIGINT, self._handle_signal)
 
        LOG.debug(_('Full set of CONF:'))
            signame = {signal.SIGTERM: 'SIGTERM',
                       signal.SIGINT: 'SIGINT'}[exc.signo]
            LOG.info(_('Caught %s, exiting'), signame)
            status = exc.code
        except SystemExit as exc:
        self.readpipe.read()
 
        LOG.info(_('Parent process has died unexpectedly, exiting'))
 
        sys.exit(1)
            # die instantly too quickly.
            if time.time() - wrap.forktimes[0] < wrap.workers:
                LOG.info(_('Forking too fast, sleeping'))
                time.sleep(1)
 

src/t/u/tuskar-0.4.1/tuskar/openstack/common/rpc/impl_qpid.py   tuskar(Download)
from oslo.config import cfg
 
from tuskar.openstack.common.gettextutils import _
from tuskar.openstack.common import importutils
from tuskar.openstack.common import jsonutils
            self.callback(msg)
        except Exception:
            LOG.exception(_("Failed to process message... skipping it."))
        finally:
            self.session.acknowledge(message)
            except qpid_exceptions.ConnectionError as e:
                msg_dict = dict(e=e, delay=delay)
                msg = _("Unable to connect to AMQP server: %(e)s. "
                        "Sleeping %(delay)s seconds") % msg_dict
                LOG.error(msg)
                time.sleep(delay)
                delay = min(2 * delay, 60)
            else:
                LOG.info(_('Connected to AMQP server on %s'), broker)
                self._register_consumer(consumer)
 
            LOG.debug(_("Re-established AMQP queues"))
 
    def ensure(self, error_callback, method, *args, **kwargs):

src/t/u/tuskar-0.4.1/tuskar/openstack/common/rpc/amqp.py   tuskar(Download)
 
from tuskar.openstack.common import excutils
from tuskar.openstack.common.gettextutils import _
from tuskar.openstack.common import local
from tuskar.openstack.common import log as logging
    def create(self):
        LOG.debug(_('Pool creating new connection'))
        return self.connection_cls(self.conf)
 
    def empty(self):
    def _process_data(self, message_data):
        msg_id = message_data.pop('_msg_id', None)
        waiter = self._call_waiters.get(msg_id)
        if not waiter:
            LOG.warn(_('no calling threads waiting for msg_id : %(msg_id)s'
    def add_call_waiter(self, waiter, msg_id):
        self._num_call_waiters += 1
        if self._num_call_waiters > self._num_call_waiters_wrn_threshhold:
            LOG.warn(_('Number of call waiters is greater than warning '
                       'threshhold: %d. There could be a MulticallProxyWaiter '
    context_dict['conf'] = conf
    ctx = RpcContext.from_dict(context_dict)
    rpc_common._safe_log(LOG.debug, _('unpacked context: %s'), ctx.to_dict())
    return ctx
 

  1 | 2 | 3 | 4 | 5  Next