def apply_analysis_request_partition_interface(portal):
    """Walks trhough all AR-like partitions registered in the system and
    applies the IAnalysisRequestPartition marker interface to them
    """
    logger.info("Applying 'IAnalysisRequestPartition' marker interface ...")
    query = dict(portal_type="AnalysisRequest", isRootAncestor=False)
    brains = api.search(query, CATALOG_ANALYSIS_REQUEST_LISTING)
    total = len(brains)
    for num, brain in enumerate(brains):
        if num % 100 == 0:
            logger.info("Applying 'IAnalysisRequestPartition' interface: {}/{}"
                        .format(num, total))
        ar = api.get_object(brain)
        if IAnalysisRequestPartition.providedBy(ar):
            continue
        if ar.getParentAnalysisRequest():
            alsoProvides(ar, IAnalysisRequestPartition)
    commit_transaction(portal)
def apply_analysis_request_partition_interface ( portal ) : logger . info ( "Applying 'IAnalysisRequestPartition' marker interface ..." ) query = dict ( portal_type = "AnalysisRequest" , isRootAncestor = False ) brains = api . search ( query , CATALOG_ANALYSIS_REQUEST_LISTING ) total = len ( brains ) for num , brain in enumerate ( brains ) : if num % 100 == 0 : logger . info ( "Applying 'IAnalysisRequestPartition' interface: {}/{}" . format ( num , total ) ) ar = api . get_object ( brain ) if IAnalysisRequestPartition . providedBy ( ar ) : continue if ar . getParentAnalysisRequest ( ) : alsoProvides ( ar , IAnalysisRequestPartition ) commit_transaction ( portal )
Walks trhough all AR-like partitions registered in the system and
    applies the IAnalysisRequestPartition marker interface to them