How to use the kombu.utils.cached_property function in kombu

To help you get started, we’ve selected a few kombu examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ansible / awx / awx / lib / site-packages / celery / app / amqp.py View on Github external
    @cached_property
    def router(self):
        return self.Router()
github ansible / awx / awx / lib / site-packages / celery / worker / state.py View on Github external
    @cached_property
    def db(self):
        self._is_open = True
        return self.open()
github celery / kombu / kombu / transport / redis.py View on Github external
    @cached_property
    def client(self):
        """Client used to publish messages, BRPOP etc."""
        return self._create_client()
github celery / kombu / kombu / transport / sqlalchemy / __init__.py View on Github external
    @cached_property
    def queue_cls(self):
        return self._declarative_cls(
            bytes_if_py2('Queue'),
            QueueBase,
            {'__tablename__': self.queue_tablename}
        )
github celery / kombu / kombu / transport / redis.py View on Github external
    @cached_property
    def subclient(self):
        """Pub/Sub connection used to consume fanout queues."""
        client = self._create_client()
        pubsub = client.pubsub()
        pool = pubsub.connection_pool
        pubsub.connection = pool.get_connection('pubsub', pubsub.shard_hint)
        return pubsub
github omegaml / omegaml / omegaml / celery_util.py View on Github external
    @cached_property
    def _not_eager(self):
        app = self._app
        return not app.conf.CELERY_ALWAYS_EAGER
github ansible / awx / awx / lib / site-packages / celery / canvas.py View on Github external
    @cached_property
    def _apply_async(self):
        try:
            return self.type.apply_async
        except KeyError:
            return _partial(self.app.send_task, self['task'])
    id = _getitem_property('options.task_id')
github celery / kombu / kombu / transport / redis.py View on Github external
    @cached_property
    def unacked_key(self):
        return self.channel.unacked_key
github ansible / awx / awx / lib / site-packages / celery / app / base.py View on Github external
    @cached_property
    def timezone(self):
        from celery.utils.timeutils import timezone
        conf = self.conf
        tz = conf.CELERY_TIMEZONE
        if not tz:
            return (timezone.get_timezone('UTC') if conf.CELERY_ENABLE_UTC
                    else timezone.local)
        return timezone.get_timezone(self.conf.CELERY_TIMEZONE)
App = Celery  # compat
github celery / celery / celery / backends / cosmosdbsql.py View on Github external
    @cached_property
    def _database_link(self):
        return "dbs/" + self._database_name