def
update(self):
self.logger.info("CVE database update started")
+
self.process_downloads()
+
# if collection is non-existent; assume it's not an update
if self.feed_type.lower() not in self.getTableNames():
DatabaseIndexer().create_indexes(collection=self.feed_type.lower())
self.is_update = False
-
self.process_downloads()
-
self.logger.info("Finished CVE database update")
return self.last_modified
@@ -929,10 +929,10 @@
Source code for CveXplore.database.maintenance.Sources_process
self.dropCollection(self.feed_type.lower())
- DatabaseIndexer().create_indexes(collection=self.feed_type.lower())
-
self.process_downloads()
+ DatabaseIndexer().create_indexes(collection=self.feed_type.lower())
+
self.logger.info("Finished CVE database population")
return self.last_modified
@@ -1263,6 +1263,7 @@
Source code for CveXplore.database.maintenance.Sources_process
MongoAddIndex(
index=[("padded_version", ASCENDING)], name="padded_version"
),
+ MongoAddIndex(index=[("lastModified", ASCENDING)], name="lastModified"),
],
"cpeother": [
MongoUniqueIndex(index=[("id", ASCENDING)], name="id", unique=True)