@@ -37,12 +37,13 @@ def handle(self, *args, **options):
3737
3838 self .stdout .write (self .style .SUCCESS ("Successfully exported vulnerablecode data" ))
3939
40- def export_data (self , git_path ):
40+ @staticmethod
41+ def export_data (git_path ):
4142 """
4243 export vulnerablecode data
4344 by running `python manage.py export /path/vulnerablecode-data`
4445 """
45- self .stdout .write ("Exporting vulnerablecode data" )
46+ # self.stdout.write("Exporting vulnerablecode data")
4647
4748 ecosystems = [pkg .type for pkg in Package .objects .distinct ("type" )]
4849
@@ -51,8 +52,7 @@ def export_data(self, git_path):
5152 vul_files = {} # {"vulnerability path": "data" }
5253
5354 for purl in (
54- Package .objects .filter (type = ecosystem )
55- .prefetch_related ("vulnerabilities" )
55+ Package .objects .prefetch_related ("vulnerabilities" ).filter (type = ecosystem )[0 :10 ]
5656 .paginated ()
5757 ):
5858 purl_without_version = PackageURL (
@@ -101,11 +101,11 @@ def export_data(self, git_path):
101101 ],
102102 }
103103
104- for items in [package_files , vul_files ]:
105- for filepath , data in items .items ():
106- create_file (filepath , git_path , data )
104+ # for items in [package_files, vul_files]:
105+ # for filepath, data in items.items():
106+ # create_file(filepath, git_path, data)
107107
108- self .stdout .write (f"Successfully exported { ecosystem } data" )
108+ # self.stdout.write(f"Successfully exported {ecosystem} data")
109109
110110
111111def create_file (filepath , git_path , data ):
0 commit comments