(pillow_id='location-ucr-pillow', include_ucrs=None,
                        num_processes=1, process_num=0, ucr_configs=None, **kwargs)
return ConstructedPillow(
        name=pillow_id,
        change_feed=change_feed,
        checkpoint=checkpoint,
        change_processed_event_handler=event_handler,
        processor=[ucr_processor]
    )
Processes updates to locations for UCR

    Note this is only applicable if a domain on the environment has `LOCATIONS_IN_UCR` flag enabled.

    Processors:
      - :py:func:`corehq.apps.userreports.pillow.ConfigurableReportPillowProcessor`
Processes updates to locations for UCR
Processes updates to locations for UCR
def get_location_pillow(pillow_id='location-ucr-pillow', include_ucrs=None,
                        num_processes=1, process_num=0, ucr_configs=None, **kwargs):
    """Processes updates to locations for UCR

    Note this is only applicable if a domain on the environment has `LOCATIONS_IN_UCR` flag enabled.

    Processors:
      - :py:func:`corehq.apps.userreports.pillow.ConfigurableReportPillowProcessor`
    """
    change_feed = KafkaChangeFeed(
        [LOCATION_TOPIC], client_id=pillow_id, num_processes=num_processes, process_num=process_num
    )
    table_manager = ConfigurableReportTableManager(
        data_source_providers=[
            DynamicDataSourceProvider('Location'),
            StaticDataSourceProvider('Location')
        ],
        include_ucrs=include_ucrs
    )
    ucr_processor = ConfigurableReportPillowProcessor(table_manager)
    if ucr_configs:
        table_manager.bootstrap(ucr_configs)
    checkpoint = KafkaPillowCheckpoint(pillow_id, [LOCATION_TOPIC])
    event_handler = KafkaCheckpointEventHandler(
        checkpoint=checkpoint, checkpoint_frequency=1000, change_feed=change_feed,
        checkpoint_callback=ucr_processor
    )
    return ConstructedPillow(
        name=pillow_id,
        change_feed=change_feed,
        checkpoint=checkpoint,
        change_processed_event_handler=event_handler,
        processor=[ucr_processor]
    )
def get_location_pillow ( pillow_id = 'location-ucr-pillow' , include_ucrs = None , num_processes = 1 , process_num = 0 , ucr_configs = None , * * kwargs ) : change_feed = KafkaChangeFeed ( [ LOCATION_TOPIC ] , client_id = pillow_id , num_processes = num_processes , process_num = process_num ) table_manager = ConfigurableReportTableManager ( data_source_providers = [ DynamicDataSourceProvider ( 'Location' ) , StaticDataSourceProvider ( 'Location' ) ] , include_ucrs = include_ucrs ) ucr_processor = ConfigurableReportPillowProcessor ( table_manager ) if ucr_configs : table_manager . bootstrap ( ucr_configs ) checkpoint = KafkaPillowCheckpoint ( pillow_id , [ LOCATION_TOPIC ] ) event_handler = KafkaCheckpointEventHandler ( checkpoint = checkpoint , checkpoint_frequency = 1000 , change_feed = change_feed , checkpoint_callback = ucr_processor ) return ConstructedPillow ( name = pillow_id , change_feed = change_feed , checkpoint = checkpoint , change_processed_event_handler = event_handler , processor = [ ucr_processor ] )