Exemplo n.º 1
0
def set_default_engine_ids(apps, schema_editor):
    if not settings.UNIT_TESTING:
        get_preindex_plugin('userreports').sync_design_docs()
        ucr_db = DataSourceConfiguration.get_db()
        with IterDB(ucr_db) as iter_db:
            for doc in iter_docs(ucr_db, DataSourceConfiguration.all_ids()):
                if not doc.get('engine_id'):
                    doc['engine_id'] = DEFAULT_ENGINE_ID
                    iter_db.save(doc)
Exemplo n.º 2
0
def set_default_engine_ids(apps, schema_editor):
    if not settings.UNIT_TESTING:
        get_preindex_plugin('userreports').sync_design_docs()
        ucr_db = DataSourceConfiguration.get_db()
        with IterDB(ucr_db) as iter_db:
            for doc in iter_docs(ucr_db, DataSourceConfiguration.all_ids()):
                if not doc.get('engine_id'):
                    doc['engine_id'] = DEFAULT_ENGINE_ID
                    iter_db.save(doc)
Exemplo n.º 3
0
def bootstrap_sms(apps, schema_editor):
    get_preindex_plugin('sms').sync_design_docs()
    bootstrap_grapevine_gateway(apps)
    bootstrap_mach_gateway(apps)
    bootstrap_tropo_gateway(apps)
    bootstrap_twilio_gateway(
        apps,
        'corehq/apps/smsbillables/management/commands/pricing_data/twilio-rates-2015_10_06.csv'
    )
    bootstrap_unicel_gateway(apps)
    call_command('bootstrap_usage_fees')
    bootstrap_moz_gateway(apps)
    bootstrap_test_gateway(apps)
    bootstrap_telerivet_gateway(apps)
    bootstrap_twilio_gateway_incoming(apps)
    bootstrap_yo_gateway(apps)
    add_moz_zero_charge(apps)
    bootstrap_grapevine_gateway_update(apps)
Exemplo n.º 4
0
def catch_signal(sender, using=None, **kwargs):
    """Function used by syncdb signal"""
    if using != 'default':
        # only sync for the default DB
        return

    app_name = sender.label.rsplit('.', 1)[0]
    app_label = app_name.split('.')[-1]
    plugin = get_preindex_plugin(app_label)
    if plugin:
        plugin.sync_design_docs()
Exemplo n.º 5
0
def catch_signal(sender, using=None, **kwargs):
    """Function used by syncdb signal"""
    if using != "default":
        # only sync for the default DB
        return

    app_name = sender.label.rsplit(".", 1)[0]
    app_label = app_name.split(".")[-1]
    plugin = get_preindex_plugin(app_label)
    if plugin:
        plugin.sync_design_docs()
Exemplo n.º 6
0
def _get_all_docs_dbs():
    return get_preindex_plugin('couchapps').get_dbs('all_docs')
Exemplo n.º 7
0
def _get_all_docs_dbs():
    return get_preindex_plugin('couchapps').get_dbs('all_docs')
Exemplo n.º 8
0
def _get_all_docs_dbs():
    return get_preindex_plugin("domain").get_dbs("domain") + [get_db(None)]