def __init__(self, online=True, **kwargs): """ online determines whether the ES index should initialize itself on pillow creation """ if 'checkpoint' not in kwargs: kwargs['checkpoint'] = get_default_django_checkpoint_for_legacy_pillow_class(self.__class__) super(AliasedElasticPillow, self).__init__(**kwargs) # online=False is used in unit tests if online: completely_initialize_pillow_index(self)
def __init__(self, chunk_size=None, checkpoint=None, change_feed=None, preload_docs=True): # explicitly check against None since we want to pass chunk_size=0 through chunk_size = chunk_size if chunk_size is not None else PYTHONPILLOW_CHUNK_SIZE # fluff pillows should default to SQL checkpoints checkpoint = checkpoint or get_default_django_checkpoint_for_legacy_pillow_class(self.__class__) super(FluffPillow, self).__init__( chunk_size=chunk_size, checkpoint=checkpoint, change_feed=change_feed, preload_docs=preload_docs, )
def __init__(self, chunk_size=None, checkpoint=None, change_feed=None, preload_docs=True): # explicitly check against None since we want to pass chunk_size=0 through chunk_size = chunk_size if chunk_size is not None else PYTHONPILLOW_CHUNK_SIZE # fluff pillows should default to SQL checkpoints checkpoint = checkpoint or get_default_django_checkpoint_for_legacy_pillow_class(self.__class__) if change_feed is None and self.kafka_topic: change_feed = KafkaChangeFeed(topics=[self.kafka_topic], group_id=self.__class__.__name__) preload_docs = False # it's never necessary preload_docs for kafka pillows super(FluffPillow, self).__init__( chunk_size=chunk_size, checkpoint=checkpoint, change_feed=change_feed, preload_docs=preload_docs, )
def __init__(self): checkpoint = get_default_django_checkpoint_for_legacy_pillow_class(self.__class__) super(UnknownUsersPillow, self).__init__(checkpoint=checkpoint) self.user_db = CouchUser.get_db() self.es = get_es_new() self.es_type = ES_META['users'].type
def __init__(self): checkpoint = get_default_django_checkpoint_for_legacy_pillow_class(self.__class__) super(GroupToUserPillow, self).__init__(checkpoint=checkpoint) self.es = get_es_new() self.es_type = ES_META['users'].type
def __init__(self): checkpoint = get_default_django_checkpoint_for_legacy_pillow_class(self.__class__) super(SQLPillow, self).__init__(checkpoint=checkpoint)
def __init__(self): checkpoint = get_default_django_checkpoint_for_legacy_pillow_class(self.__class__) super(MVPIndicatorPillowBase, self).__init__(checkpoint=checkpoint)