Skip to content

Commit

Permalink
fix(ingest): use mongodb ping command to test connection
Browse files Browse the repository at this point in the history
Closes #5637.
  • Loading branch information
hsheth2 committed Aug 16, 2022
1 parent a991dc9 commit 5b18f97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metadata-ingestion/src/datahub/ingestion/source/mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def __init__(self, ctx: PipelineContext, config: MongoDBConfig):

# This cheaply tests the connection. For details, see
# https://pymongo.readthedocs.io/en/stable/api/pymongo/mongo_client.html#pymongo.mongo_client.MongoClient
self.mongo_client.admin.command("ismaster")
self.mongo_client.admin.command("ping")

@classmethod
def create(cls, config_dict: dict, ctx: PipelineContext) -> "MongoDBSource":
Expand Down

0 comments on commit 5b18f97

Please sign in to comment.