コード例 #1
0
ファイル: tasks.py プロジェクト: ekush/commcare-hq
def migration_task():
    for config in EWSGhanaConfig.get_all_steady_sync_configs():
        if config.enabled:
            endpoint = GhanaEndpoint.from_config(config)
            ews_bootstrap_domain(EWSApi(config.domain, endpoint))
            stock_data_task.delay(
                EWSStockDataSynchronization(config.domain, endpoint))
コード例 #2
0
ファイル: tasks.py プロジェクト: LifeCoaching/commcare-hq
def migration_task():
    from custom.ilsgateway.stock_data import ILSStockDataSynchronization
    for config in ILSGatewayConfig.get_all_steady_sync_configs():
        if config.enabled:
            endpoint = ILSGatewayEndpoint.from_config(config)
            ils_bootstrap_domain(ILSGatewayAPI(config.domain, endpoint))
            stock_data_task.delay(ILSStockDataSynchronization(config.domain, endpoint))
コード例 #3
0
ファイル: views.py プロジェクト: aristide/commcare-hq
def ils_sync_stock_data(request, domain):
    config = ILSGatewayConfig.for_domain(domain)
    domain = config.domain
    endpoint = ILSGatewayEndpoint.from_config(config)
    apis = get_ilsgateway_data_migrations()
    stock_data_task.delay(domain, endpoint, apis, config, ILS_FACILITIES)
    return HttpResponse('OK')
コード例 #4
0
ファイル: tasks.py プロジェクト: aristide/commcare-hq
def migration_task():
    for config in ILSGatewayConfig.get_all_steady_sync_configs():
        if config.enabled:
            endpoint = ILSGatewayEndpoint.from_config(config)
            ils_bootstrap_domain(ILSGatewayAPI(config.domain, endpoint))
            apis = get_ilsgateway_data_migrations()
            stock_data_task.delay(config.domain, endpoint, apis, config, ILS_FACILITIES)
コード例 #5
0
ファイル: views.py プロジェクト: aristide/commcare-hq
def ews_sync_stock_data(request, domain):
    apis = (
        ('stock_transaction', sync_stock_transactions),
    )
    config = EWSGhanaConfig.for_domain(domain)
    domain = config.domain
    endpoint = GhanaEndpoint.from_config(config)
    stock_data_task.delay(domain, endpoint, apis, config, EWS_FACILITIES)
    return HttpResponse('OK')
コード例 #6
0
ファイル: tasks.py プロジェクト: aristide/commcare-hq
def migration_task():
    for config in EWSGhanaConfig.get_all_steady_sync_configs():
        if config.enabled:
            endpoint = GhanaEndpoint.from_config(config)
            ews_bootstrap_domain(EWSApi(config.domain, endpoint))
            apis = (
                ('stock_transaction', sync_stock_transactions),
            )
            stock_data_task.delay(config.domain, endpoint, apis, config, EWS_FACILITIES)
コード例 #7
0
ファイル: views.py プロジェクト: jmaina/commcare-hq
def ils_sync_stock_data(request, domain):
    config = ILSGatewayConfig.for_domain(domain)
    domain = config.domain
    endpoint = ILSGatewayEndpoint.from_config(config)
    apis = (
        ('product_stock', get_product_stock),
        ('stock_transaction', get_stock_transaction),
        ('supply_point_status', get_supply_point_statuses),
        ('delivery_group', get_delivery_group_reports)
    )
    stock_data_task.delay(domain, endpoint, apis, ILS_FACILITIES)
    return HttpResponse('OK')
コード例 #8
0
ファイル: views.py プロジェクト: bazuzi/commcare-hq
def ils_sync_stock_data(request, domain):
    config = ILSGatewayConfig.for_domain(domain)
    domain = config.domain
    endpoint = ILSGatewayEndpoint.from_config(config)
    stock_data_task.delay(ILSStockDataSynchronization(domain, endpoint))
    return HttpResponse('OK')
コード例 #9
0
ファイル: tasks.py プロジェクト: johan--/commcare-hq
def migration_task():
    for config in EWSGhanaConfig.get_all_steady_sync_configs():
        if config.enabled:
            endpoint = GhanaEndpoint.from_config(config)
            ews_bootstrap_domain(EWSApi(config.domain, endpoint))
            stock_data_task.delay(EWSStockDataSynchronization(config.domain, endpoint))
コード例 #10
0
ファイル: views.py プロジェクト: LifeCoaching/commcare-hq
def ews_sync_stock_data(request, domain):
    config = EWSGhanaConfig.for_domain(domain)
    domain = config.domain
    endpoint = GhanaEndpoint.from_config(config)
    stock_data_task.delay(EWSStockDataSynchronization(domain, endpoint))
    return HttpResponse('OK')
コード例 #11
0
ファイル: views.py プロジェクト: ekush/commcare-hq
def ils_sync_stock_data(request, domain):
    config = ILSGatewayConfig.for_domain(domain)
    domain = config.domain
    endpoint = ILSGatewayEndpoint.from_config(config)
    stock_data_task.delay(ILSStockDataSynchronization(domain, endpoint))
    return HttpResponse('OK')
コード例 #12
0
def ews_sync_stock_data(request, domain):
    config = EWSGhanaConfig.for_domain(domain)
    domain = config.domain
    endpoint = GhanaEndpoint.from_config(config)
    stock_data_task.delay(EWSStockDataSynchronization(domain, endpoint))
    return HttpResponse('OK')