diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2019-05-16 13:49:59 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2019-05-16 13:49:59 -0300 |
commit | 4e935dbe2b86d887f38bdcddd6f00042f28d7b9a (patch) | |
tree | 4b43ac56b24daa369b4aaacc1acabb19641ef70c | |
parent | e1bb000864ffe7e303d1cb180d757dffb0328389 (diff) | |
download | ckandumper-4e935dbe2b86d887f38bdcddd6f00042f28d7b9a.tar.gz ckandumper-4e935dbe2b86d887f38bdcddd6f00042f28d7b9a.tar.bz2 |
Put all package contents in a single async loop
-rwxr-xr-x | ckandumper | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |