def remove_from_poller(self, gid): # remove from master set self.rc.zrem(S1.gid_set('all'), gid) # clear cache self.rc.delete(S1.cache_key(gid)) self.del_destination_param(gid, 'cache', gid, S1.updated_key()) self.del_destination_param(gid, 'cache', gid, S1.etag_key()) self.purge_temp_accounts(gid)
def is_valid_gid(self, gid): return self.rc.zscore(S1.gid_set('all'), gid) or self.rc.exists( S1.gid_key(gid))