コード例 #1
0
ファイル: AnalyzeTask.py プロジェクト: faheemfayyaz/androlyze
    def __setup_db(self):
        ''' Open database if not already done.
        Db will only be set up per process, not for each task!

        Raises
        ------
        StorageException
            Error while opening.
        '''
        if self.result_database_storage is None:
            log.info("setup_db ...")
            
            self.result_database_storage = ResultDatabaseStorage.factory_from_config(settings)
コード例 #2
0
ファイル: AnalyzeTask.py プロジェクト: umr-ds/androlyze
    def __setup_db(self):
        ''' Open database if not already done.
        Db will only be set up per process, not for each task!

        Raises
        ------
        StorageException
            Error while opening.
        '''
        if self.result_database_storage is None:
            log.info("setup_db ...")

            self.result_database_storage = ResultDatabaseStorage.factory_from_config(
                settings)
コード例 #3
0
ファイル: ApkStorageFactory.py プロジェクト: umr-ds/androlyze
def get_apk_storage(settings):
    ''' Get an object implementing the `ApkCopyInterface`.
    
    Parameters
    ----------
    settings : Settings
    '''
    import androlyze.settings as s
    storage_engine = settings.get_apk_storage_engine()
    log.warn("Using APK storage: %s" % storage_engine)
    
    if storage_engine == s.SECTION_S3_STORAGE:
        return S3Storage.factory_from_config(settings)
    elif storage_engine == s.SECTION_RESULT_DB:
        return ResultDatabaseStorage.factory_from_config(settings)
    else:
        raise RuntimeError("No Storage engine defined! But requested!")
コード例 #4
0
ファイル: ApkStorageFactory.py プロジェクト: helit2/androlyze
def get_apk_storage(settings):
    """ Get an object implementing the `ApkCopyInterface`.
    
    Parameters
    ----------
    settings : Settings
    """
    import androlyze.settings as s

    storage_engine = settings.get_apk_storage_engine()
    log.warn("Using APK storage: %s" % storage_engine)

    if storage_engine == s.SECTION_S3_STORAGE:
        return S3Storage.factory_from_config(settings)
    elif storage_engine == s.SECTION_RESULT_DB:
        return ResultDatabaseStorage.factory_from_config(settings)
    else:
        raise RuntimeError("No Storage engine defined! But requested!")