(self, changes)
return retry_changes, change_exceptions
Update UCR tables in bulk by breaking up changes per domain per UCR table.
            If an exception is raised in bulk operations of a set of changes,
            those changes are returned to pillow for serial reprocessing.
Update UCR tables in bulk by breaking up changes per domain per UCR table.
            If an exception is raised in bulk operations of a set of changes,
            those changes are returned to pillow for serial reprocessing.
Update UCR tables in bulk by breaking up changes per domain per UCR table . If an exception is raised in bulk operations of a set of changes those changes are returned to pillow for serial reprocessing .
def process_changes_chunk(self, changes):
        """
        Update UCR tables in bulk by breaking up changes per domain per UCR table.
            If an exception is raised in bulk operations of a set of changes,
            those changes are returned to pillow for serial reprocessing.
        """
        self.bootstrap_if_needed()
        # break up changes by domain
        changes_by_domain = defaultdict(list)
        for change in changes:
            if is_couch_change_for_sql_domain(change):
                continue
            # skip if no domain or no UCR tables in the domain
            if change.metadata.domain and change.metadata.domain in self.table_manager.relevant_domains:
                changes_by_domain[change.metadata.domain].append(change)

        retry_changes = set()
        change_exceptions = []
        for domain, changes_chunk in changes_by_domain.items():
            with WarmShutdown():
                failed, exceptions = self._process_chunk_for_domain(domain, changes_chunk)
            retry_changes.update(failed)
            change_exceptions.extend(exceptions)

        return retry_changes, change_exceptions
def process_changes_chunk ( self , changes ) : self . bootstrap_if_needed ( ) # break up changes by domain changes_by_domain = defaultdict ( list ) for change in changes : if is_couch_change_for_sql_domain ( change ) : continue # skip if no domain or no UCR tables in the domain if change . metadata . domain and change . metadata . domain in self . table_manager . relevant_domains : changes_by_domain [ change . metadata . domain ] . append ( change ) retry_changes = set ( ) change_exceptions = [ ] for domain , changes_chunk in changes_by_domain . items ( ) : with WarmShutdown ( ) : failed , exceptions = self . _process_chunk_for_domain ( domain , changes_chunk ) retry_changes . update ( failed ) change_exceptions . extend ( exceptions ) return retry_changes , change_exceptions