From 931c29a21f7bad01c8bcf94d47da96665e7dfa42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 29 May 2019 13:43:31 +0200 Subject: [PATCH] =?UTF-8?q?MongoDB:=20db.collection=5Fnames()=20is=20depre?= =?UTF-8?q?cated=20=E2=86=92=20db.list=5Fcollection=5Fnames()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pillar/cli/maintenance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillar/cli/maintenance.py b/pillar/cli/maintenance.py index 5f15f9fd..4b5f4fae 100644 --- a/pillar/cli/maintenance.py +++ b/pillar/cli/maintenance.py @@ -823,7 +823,7 @@ def _find_orphan_files() -> typing.Set[bson.ObjectId]: # Find all references by iterating through the project itself and every document that has a # 'project' key set to this ObjectId. db = current_app.db() - for coll_name in sorted(db.collection_names(include_system_collections=False)): + for coll_name in sorted(db.list_collection_names()): if coll_name in ORPHAN_FINDER_SKIP_COLLECTIONS: continue