示例#1
0
def config_from_configman():
    """Generate a configman DotDict to pass to configman components."""
    definition_source = Namespace()
    definition_source.namespace('logging')
    definition_source.logging = App.required_config.logging

    definition_source.namespace('metricscfg')
    definition_source.metricscfg = App.required_config.metricscfg

    definition_source.namespace('elasticsearch')
    definition_source.elasticsearch.add_option(
        'elasticsearch_class',
        default=ESConnectionContext,
    )
    definition_source.namespace('queue')
    definition_source.add_option('crashqueue_class', default=PubSubCrashQueue)
    definition_source.namespace('crashdata')
    definition_source.crashdata.add_option(
        'crash_data_class',
        default=SimplifiedCrashData,
    )
    definition_source.namespace('telemetrydata')
    definition_source.telemetrydata.add_option(
        'telemetry_data_class',
        default=TelemetryCrashData,
    )

    return configuration(definition_source=definition_source,
                         values_source_list=[
                             settings.SOCORRO_IMPLEMENTATIONS_CONFIG,
                         ])
def config_from_configman():
    definition_source = Namespace()
    definition_source.namespace('logging')
    definition_source.logging = socorro_app.App.required_config.logging

    definition_source.namespace('metricscfg')
    definition_source.metricscfg = socorro_app.App.required_config.metricscfg

    definition_source.namespace('elasticsearch')
    definition_source.elasticsearch.add_option(
        'elasticsearch_class',
        default=ESConnectionContext,
    )
    definition_source.namespace('queue')
    definition_source.add_option(
        'crashqueue_class',
        default=PubSubCrashQueue
    )
    definition_source.namespace('crashdata')
    definition_source.crashdata.add_option(
        'crash_data_class',
        default=socorro.external.boto.crash_data.SimplifiedCrashData,
    )
    definition_source.namespace('telemetrydata')
    definition_source.telemetrydata.add_option(
        'telemetry_data_class',
        default=socorro.external.boto.crash_data.TelemetryCrashData,
    )

    return configuration(
        definition_source=definition_source,
        values_source_list=[
            settings.SOCORRO_IMPLEMENTATIONS_CONFIG,
        ]
    )
示例#3
0
def config_from_configman():
    """Generate a configman DotDict to pass to configman components."""
    definition_source = Namespace()
    definition_source.namespace("logging")
    definition_source.logging = App.required_config.logging

    definition_source.namespace("metricscfg")
    definition_source.metricscfg = App.required_config.metricscfg

    definition_source.namespace("elasticsearch")
    definition_source.elasticsearch.add_option("elasticsearch_class",
                                               default=ESConnectionContext)
    definition_source.namespace("queue")
    definition_source.add_option("crashqueue_class",
                                 default=import_string(settings.CRASHQUEUE))
    definition_source.namespace("crashdata")
    definition_source.crashdata.add_option("crash_data_class",
                                           default=SimplifiedCrashData)
    definition_source.namespace("telemetrydata")
    definition_source.telemetrydata.add_option("telemetry_data_class",
                                               default=TelemetryCrashData)

    return configuration(
        definition_source=definition_source,
        values_source_list=[settings.SOCORRO_CONFIG],
    )
示例#4
0
def config_from_configman():
    definition_source = Namespace()
    definition_source.namespace('logging')
    definition_source.logging = socorro_app.App.required_config.logging

    definition_source.namespace('metricscfg')
    definition_source.metricscfg = socorro_app.App.required_config.metricscfg

    definition_source.namespace('elasticsearch')
    definition_source.elasticsearch.add_option(
        'elasticsearch_class',
        default=ElasticsearchConfig,
    )
    definition_source.namespace('database')
    definition_source.database.add_option(
        'database_storage_class',
        default=PostgreSQLStorage,
    )
    definition_source.namespace('queuing')
    definition_source.queuing.add_option(
        'rabbitmq_reprocessing_class',
        default=ReprocessingOneRabbitMQCrashStore,
    )
    definition_source.namespace('priority')
    definition_source.priority.add_option(
        'rabbitmq_priority_class',
        default=PriorityjobRabbitMQCrashStore,
    )
    definition_source.namespace('crashdata')
    definition_source.crashdata.add_option(
        'crash_data_class',
        default=socorro.external.boto.crash_data.SimplifiedCrashData,
    )
    definition_source.namespace('telemetrydata')
    definition_source.telemetrydata.add_option(
        'telemetry_data_class',
        default=socorro.external.boto.crash_data.TelemetryCrashData,
    )

    config = configuration(
        definition_source=definition_source,
        values_source_list=[
            settings.SOCORRO_IMPLEMENTATIONS_CONFIG,
        ]
    )
    # The ReprocessingOneRabbitMQCrashStore crash storage, needs to have
    # a "logger" in the config object. To avoid having to use the
    # logger set up by configman as an aggregate, we just use the
    # same logger as we have here in the webapp.
    config.queuing.logger = logger
    config.priority.logger = logger
    config.crashdata.logger = logger
    config.telemetrydata.logger = logger
    return config
示例#5
0
def config_from_configman():
    definition_source = Namespace()
    definition_source.namespace('logging')
    definition_source.logging = socorro_app.App.required_config.logging

    definition_source.namespace('metricscfg')
    definition_source.metricscfg = socorro_app.App.required_config.metricscfg

    definition_source.namespace('elasticsearch')
    definition_source.elasticsearch.add_option(
        'elasticsearch_class',
        default=ElasticsearchConfig,
    )
    definition_source.namespace('database')
    definition_source.database.add_option(
        'database_storage_class',
        default=PostgreSQLStorage,
    )
    definition_source.namespace('queuing')
    definition_source.queuing.add_option(
        'rabbitmq_reprocessing_class',
        default=ReprocessingOneRabbitMQCrashStore,
    )
    definition_source.namespace('priority')
    definition_source.priority.add_option(
        'rabbitmq_priority_class',
        default=PriorityjobRabbitMQCrashStore,
    )
    definition_source.namespace('crashdata')
    definition_source.crashdata.add_option(
        'crash_data_class',
        default=socorro.external.boto.crash_data.SimplifiedCrashData,
    )
    definition_source.namespace('telemetrydata')
    definition_source.telemetrydata.add_option(
        'telemetry_data_class',
        default=socorro.external.boto.crash_data.TelemetryCrashData,
    )

    config = configuration(
        definition_source=definition_source,
        values_source_list=[
            settings.SOCORRO_IMPLEMENTATIONS_CONFIG,
        ]
    )
    # The ReprocessingOneRabbitMQCrashStore crash storage, needs to have
    # a "logger" in the config object. To avoid having to use the
    # logger set up by configman as an aggregate, we just use the
    # same logger as we have here in the webapp.
    config.queuing.logger = logger
    config.priority.logger = logger
    config.crashdata.logger = logger
    config.telemetrydata.logger = logger
    return config
示例#6
0
def config_from_configman():
    """Generate a configman DotDict to pass to configman components."""
    definition_source = Namespace()
    definition_source.namespace('logging')
    definition_source.logging = App.required_config.logging

    definition_source.namespace('metricscfg')
    definition_source.metricscfg = App.required_config.metricscfg

    definition_source.namespace('elasticsearch')
    definition_source.elasticsearch.add_option(
        'elasticsearch_class',
        default=ESConnectionContext,
    )
    definition_source.namespace('queue')
    definition_source.add_option(
        'crashqueue_class',
        default=PubSubCrashQueue
    )
    definition_source.namespace('crashdata')
    definition_source.crashdata.add_option(
        'crash_data_class',
        default=SimplifiedCrashData,
    )
    definition_source.namespace('telemetrydata')
    definition_source.telemetrydata.add_option(
        'telemetry_data_class',
        default=TelemetryCrashData,
    )

    return configuration(
        definition_source=definition_source,
        values_source_list=[
            settings.SOCORRO_IMPLEMENTATIONS_CONFIG,
        ]
    )