Skip to content

Commit

Permalink
fmt + lint
Browse files Browse the repository at this point in the history
  • Loading branch information
MiaAltieri committed Sep 15, 2023
1 parent c167fad commit 11f3c65
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def _on_start(self, event: StartEvent) -> None:
return

# check if this unit's deployment of MongoDB is ready
with MongoDBConnection(self.mongodb_config, f"localhost", direct=True) as direct_mongo:
with MongoDBConnection(self.mongodb_config, "localhost", direct=True) as direct_mongo:
if not direct_mongo.is_ready:
logger.debug("mongodb service is not ready yet.")
self.unit.status = WaitingStatus("waiting for MongoDB to start")
Expand Down Expand Up @@ -495,7 +495,7 @@ def _on_update_status(self, event: UpdateStatusEvent):
return

# Cannot check more advanced MongoDB statuses if mongod hasn't started.
with MongoDBConnection(self.mongodb_config, f"localhost", direct=True) as direct_mongo:
with MongoDBConnection(self.mongodb_config, "localhost", direct=True) as direct_mongo:
if not direct_mongo.is_ready:
self.unit.status = WaitingStatus("Waiting for MongoDB to start")
return
Expand Down Expand Up @@ -952,7 +952,7 @@ def _initialise_replica_set(self, event: StartEvent) -> None:
# can be corrupted.
return

with MongoDBConnection(self.mongodb_config, f"localhost", direct=True) as direct_mongo:
with MongoDBConnection(self.mongodb_config, "localhost", direct=True) as direct_mongo:
try:
logger.info("Replica Set initialization")
direct_mongo.init_replset()
Expand Down Expand Up @@ -1045,7 +1045,7 @@ def start_mongod_service(self):
mongodb_snap = snap_cache["charmed-mongodb"]
mongodb_snap.start(services=["mongod"])

# charms running as config server are responsible for maintaing a server side mongos
# charms running as config server are responsible for maintaining a server side mongos
if self.is_role(Config.CONFIG_SERVER):
mongodb_snap.start(services=["mongos"])

Expand All @@ -1059,7 +1059,7 @@ def stop_mongod_service(self):
mongodb_snap = snap_cache["charmed-mongodb"]
mongodb_snap.stop(services=["mongod"])

# charms running as config server are responsible for maintaing a server side mongos
# charms running as config server are responsible for maintaining a server side mongos
if self.is_role(Config.CONFIG_SERVER):
mongodb_snap.stop(services=["mongos"])

Expand Down

0 comments on commit 11f3c65

Please sign in to comment.