def webhook_migrate(reactor, conn, args): """ Migrate webhook indexes to table """ store = CassScalingGroupCollection(None, None, 3) eff = store.get_webhook_index_only().on(store.add_webhook_keys) return perform(get_working_cql_dispatcher(reactor, conn), eff)
def webhook_index(reactor, conn, args): """ Show webhook indexes that is not there table connection """ store = CassScalingGroupCollection(None, None, 3) eff = store.get_webhook_index_only() return perform(get_working_cql_dispatcher(reactor, conn), eff)
def get_active_cache(reactor, connection, tenant_id, group_id): """ Get active servers from servers cache table """ eff = CassScalingGroupServersCache(tenant_id, group_id).get_servers(True) disp = get_working_cql_dispatcher(reactor, connection) d = perform(disp, eff) return d.addCallback(lambda (servers, _): {s['id']: s for s in servers})