It's a type of Planche
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7 lines
457B

  1. from pymongo import MongoClient
  2. mongo = MongoClient("mongodb+srv://admin:PASSWORD@staging.mongodb.staging.oonum.io/admin?ssl=false&retryWrites=true&serverSelectionTimeoutMS=5000&connectTimeoutMS=10000&authMechanism=SCRAM-SHA-256&w=majority")
  3. # mongo["auth"].command({"compact": "Orgs", "force": True})
  4. mongo["database"].command({"compact": "collection", "force": True}) # Mongo 4.4 can compact without blocking, older versions block IO during compaction.