From 4e935dbe2b86d887f38bdcddd6f00042f28d7b9a Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 16 May 2019 13:49:59 -0300 Subject: Put all package contents in a single async loop --- ckandumper | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ckandumper b/ckandumper index bfb99d7..46c9a51 100755 --- a/ckandumper +++ b/ckandumper @@ -263,6 +263,8 @@ class CkanDumper: stats = self.download.get(packages_downloads) self.process_stats(stats) + print('Downloading contents of all packages...') + # # Package contents # @@ -272,8 +274,6 @@ class CkanDumper: package_file = package_folder + os.sep + 'package.json' contents = self.load_json(package_file) - print(f'Downloading contents of package {package}...') - for resource in contents['result']['resources']: #if resource['name'] != None: # name = resource['name'] @@ -290,8 +290,8 @@ class CkanDumper: package_downloads.append([resource['url'], resource_file]) - stats = self.download.get(package_downloads) - self.process_stats(stats) + stats = self.download.get(package_downloads) + self.process_stats(stats) if __name__ == "__main__": # Parse CLI -- cgit v1.2.3