Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@cached_property
def port(self):
return self.transport_options.get('port')
@cached_property
def channel_errors(self):
"""List of exceptions that may be raised by the channel."""
return self.transport.channel_errors
@cached_property
def producer(self):
return self.Producer(self._ensure_connected(), auto_declare=False)
@cached_property
def _maybe_due_kwargs(self):
""" handle rename of publisher to producer """
if CELERY_4_OR_GREATER:
return {'producer': self.producer} # celery 4.x
else:
return {'publisher': self.publisher} # celery 3.x
@cached_property
def stat(self):
return os.statvfs(os.path.abspath(self.path))
@cached_property
def _maybe_due_kwargs(self):
""" handle rename of publisher to producer """
return {'producer': self.producer}
@cached_property
def utc(self):
return self.app.conf.enable_utc
@cached_property
def Beat(self, **kwargs):
""":program:`celery beat` scheduler application.
See Also:
:class:`~@Beat`.
"""
return self.subclass_with_self('celery.apps.beat:Beat')
@cached_property
def _canvas(self):
from celery import canvas
return canvas
@cached_property
def data_folder_in(self):
return self.transport_options.get('data_folder_in', 'data_in')