#NEWLINE# def get_group_pillow( pillow_id = 'group-pillow' ) : #NEWLINE# #INDENT# "\n    This pillow adds users from xform submissions that come in to the User Index if they don't exist in HQ\n    " #NEWLINE# checkpoint = PillowCheckpoint ( pillow_id ) #NEWLINE# processor = ElasticProcessor ( elasticsearch = get_es_new ( ) , index_info = GROUP_INDEX_INFO ) #NEWLINE# return ConstructedPillow ( name = pillow_id , checkpoint = checkpoint , change_feed = KafkaChangeFeed ( topics = [ GROUP ] , group_id = 'groups-to-es' ) , processor = processor , change_processed_event_handler = PillowCheckpointEventHandler ( checkpoint = checkpoint , checkpoint_frequency = 100 ) )