コード例 #1
0
ファイル: CmdCache.py プロジェクト: argp/aosd
    def action(cls, args):
        """
        performs the selected cache operation
        """
        cache_action = args['cache']

        release_type = None
        if 'type' in args.keys():
            release_type = args['type']
        if cache_action == 'download_type' or cache_action == 'download_all':
            if cache_action == 'download_type':
                cacher.fetch(release_type, None)
            if cache_action == 'download_all':
                cacher.fetch(None, None)
            logging_helper.getLogger().info('Download complete, please run the "cache rebuild" command to update the index')
        if cache_action == 'clear_type':
            cacher.flush(release_type, None)
        if cache_action == 'clear_all':
            cacher.flush(None, None)
        if cache_action == 'rebuild':
            cacher.rebuild()
        if cache_action == 'setup':
            cacher.clean()
コード例 #2
0
ファイル: CmdVersion.py プロジェクト: lkheh/aosd
 def action(cls, args):
     """
     pre-fetch the manifest for this version
     """
     cacher.fetch(args['type'], args['version'])
     print('====================')
コード例 #3
0
ファイル: CmdVersion.py プロジェクト: argp/aosd
 def action(cls, args):
     """
     pre-fetch the manifest for this version
     """
     cacher.fetch(args['type'], args['version'])