@classmethod
def set_celery_app(cls, celery_app):
    """Set celery application that should be used.

        :param celery_app: celery app instance
        """
    from .dispatcher import Dispatcher
    from .task_envelope import SelinonTaskEnvelope
    cls._logger.debug('Registering Selinon to Celery context')
    cls.celery_app = celery_app
    celery_app.tasks.register(Dispatcher())
    celery_app.tasks.register(SelinonTaskEnvelope())
