Make sure Mongo ports are open before any Mongo interaction takes place

This commit is contained in:
Lauri Võsandi 2021-06-25 18:20:44 +00:00
parent bbcaaa58b6
commit db03116c63

View File

@ -125,6 +125,8 @@ async def update_firewall_rules():
os.system("ipset create -exist -quiet ipset4-mongo-replicas hash:ip")
os.system("ipset create -exist -quiet ipset6-mongo-replicas hash:ip family inet6")
apply_firewall_rules(disabled=True)
db = AsyncIOMotorClient(MONGO_URI).get_default_database()
q = {