def __set_mgr__(self, **kwargs):
        """ set the data file management for the connection

        kwargs:
            data_file_manager: instance of DataFileManager
            data_upload: list of tuples describing the files to upload
        """
        self.mgr = None
        # if kwargs.get("data_upload"):
        import rdfframework.datamanager as dm
        log.info("Setting Data Manager for conn '%s'", kwargs.get('name'))
        mgr = kwargs.get('data_file_manager', kwargs.get("name", True))
        if isinstance(mgr, dm.DataFileManager):
            self.mgr = mgr
        elif mgr == 'active_defs':
            self.mgr = dm.DefinitionManager(conn=self, **kwargs)
        elif mgr == 'datastore':
            self.mgr = dm.DatastoreManager(conn=self, **kwargs)
        else:
            self.mgr = dm.DataFileManager(conn=self, **kwargs)
        if self.mgr: # and kwargs.get('data_upload'):
            self.mgr.add_file_locations(kwargs.get('data_upload',[]))
            if kwargs.get("delay_check"):
                self.delay_check = kwargs
            else:
                if self.check_status:
                    # kwargs['log_level'] = logging.DEBUG
                    self.mgr.load(**kwargs)
                else:
                    log.warn("conn '%s' check_status failed",
                             kwargs.get('name'))
def __set_mgr__ ( self , ** kwargs ) : self . mgr = None import rdfframework . datamanager as dm log . info ( "Setting Data Manager for conn '%s'" , kwargs . get ( 'name' ) ) mgr = kwargs . get ( 'data_file_manager' , kwargs . get ( "name" , True ) ) if isinstance ( mgr , dm . DataFileManager ) : self . mgr = mgr elif mgr == 'active_defs' : self . mgr = dm . DefinitionManager ( conn = self , ** kwargs ) elif mgr == 'datastore' : self . mgr = dm . DatastoreManager ( conn = self , ** kwargs ) else : self . mgr = dm . DataFileManager ( conn = self , ** kwargs ) if self . mgr : self . mgr . add_file_locations ( kwargs . get ( 'data_upload' , [ ] ) ) if kwargs . get ( "delay_check" ) : self . delay_check = kwargs else : if self . check_status : self . mgr . load ( ** kwargs ) else : log . warn ( "conn '%s' check_status failed" , kwargs . get ( 'name' ) )
set the data file management for the connection

        kwargs:
            data_file_manager: instance of DataFileManager
            data_upload: list of tuples describing the files to upload