updated method names usage in event server subprocesses

This commit is contained in:
iLLiCiTiT 2019-11-27 15:57:54 +01:00
parent 2602fdcc73
commit e9b4c78d83
2 changed files with 3 additions and 3 deletions

View file

@ -41,7 +41,7 @@ class ProcessEventHub(ftrack_api.event.hub.EventHub):
def prepare_dbcon(self):
try:
self.dbcon.install()
self.dbcon._database.collection_names()
self.dbcon._database.list_collection_names()
except pymongo.errors.AutoReconnect:
log.error("Mongo server \"{}\" is not responding, exiting.".format(
os.environ["AVALON_MONGO"]

View file

@ -27,7 +27,7 @@ ignore_topics = []
def install_db():
try:
dbcon.install()
dbcon._database.collection_names()
dbcon._database.list_collection_names()
except pymongo.errors.AutoReconnect:
log.error("Mongo server \"{}\" is not responding, exiting.".format(
os.environ["AVALON_MONGO"]
@ -49,7 +49,7 @@ def launch(event):
try:
# dbcon.insert_one(event_data)
dbcon.update({"id": event_id}, event_data, upsert=True)
dbcon.replace_one({"id": event_id}, event_data, upsert=True)
log.debug("Event: {} stored".format(event_id))
except pymongo.errors.AutoReconnect: