Beispiel #1
0
def _collect_pending_items():
    """Gather all sources to create or delete."""
    create_events = storage.load_providers_to_create()
    destroy_events = storage.load_providers_to_delete()
    pending_events = create_events + destroy_events
    pending_events.sort(key=lambda item: item.get('offset'))
    return pending_events
Beispiel #2
0
def _collect_pending_items():
    """Gather all sources to create update, or delete."""
    create_events = storage.load_providers_to_create()
    update_events = storage.load_providers_to_update()
    destroy_events = storage.load_providers_to_delete()
    pending_events = create_events + update_events + destroy_events

    return pending_events
Beispiel #3
0
def delete_source_beat():
    providers = load_providers_to_delete()
    for p in providers:
        provider = p.get("provider")
        delete_source.delay(provider.source_id, provider.auth_header, provider.koku_uuid)