Пример #1
0
    def read_configuration(self) -> dict:
        """Load Celery config from Pyramid INI file.

        We need to be able to do this without ramping up full Websauna, because that's the order of the evens Celery worker wants. This way we avoid circular dependencies during Celery worker start up.
        """
        config = IncludeAwareConfigParser()
        config.read(ini_file)

        # TODO: We have ugly app:main hardcode hack here
        value = config.get("app:main", "websauna.celery_config")
        if not value:
            raise RuntimeError("Could not find websauna.celery_config in {}".format(ini_file))

        config = parse_celery_config(value)
        return config
Пример #2
0
    def read_configuration(self) -> dict:
        """Load Celery config from Pyramid INI file.

        We need to be able to do this without ramping up full Websauna, because that's the order of the evens Celery worker wants. This way we avoid circular dependencies during Celery worker start up.
        """
        config = IncludeAwareConfigParser()
        config.read(ini_file)

        # TODO: We have ugly app:main hardcode hack here
        value = config.get("app:main", "websauna.celery_config")
        if not value:
            raise RuntimeError("Could not find websauna.celery_config in {}".format(ini_file))

        config = parse_celery_config(value)
        return config