コード例 #1
0
def refresh_caches(org, caches):

    if OrgCache.boundaries in caches:
        Boundary.fetch_boundaries(org)

    if OrgCache.main_polls in caches:
        refresh_main_poll.delay(org.pk)

    if OrgCache.brick_polls in caches:
        refresh_brick_polls.delay(org.pk)

    if OrgCache.other_polls in caches:
        refresh_other_polls.delay(org.pk)

    if OrgCache.flows in caches:
        refresh_org_flows.delay(org.pk)
コード例 #2
0
ファイル: __init__.py プロジェクト: ennaotobo/ureport
def refresh_caches(org, caches):

    if OrgCache.boundaries in caches:
        Boundary.fetch_boundaries(org)

    if OrgCache.main_polls in caches:
        refresh_main_poll.delay(org.pk)

    if OrgCache.brick_polls in caches:
        refresh_brick_polls.delay(org.pk)

    if OrgCache.other_polls in caches:
        refresh_other_polls.delay(org.pk)

    if OrgCache.flows in caches:
        refresh_org_flows.delay(org.pk)

    if OrgCache.recent_reporters in caches:
        fetch_contacts_task.delay(org.pk)

    if OrgCache.all_reporters in caches:
        fetch_contacts_task.delay(org.pk, True)
コード例 #3
0
ファイル: __init__.py プロジェクト: musamusa/ureport
def refresh_caches(org, caches):

    if OrgCache.boundaries in caches:
        Org.rebuild_org_boundaries_task(org)

    if OrgCache.main_polls in caches:
        refresh_main_poll.delay(org.pk)

    if OrgCache.brick_polls in caches:
        refresh_brick_polls.delay(org.pk)

    if OrgCache.other_polls in caches:
        refresh_other_polls.delay(org.pk)

    if OrgCache.flows in caches:
        refresh_org_flows.delay(org.pk)

    if OrgCache.reporters in caches:
        refresh_org_reporters.delay(org.pk)

    if OrgCache.graphs_data in caches:
        refresh_org_graphs_data.delay(org.pk)