optimization on mail_reader_all_contacts.py
This commit is contained in:
+4
-1
@@ -83,7 +83,8 @@ class MongoDbManager:
|
||||
result_list.append(ContactPojo.from_firestore_dict(document))
|
||||
return result_list
|
||||
|
||||
def save_links_to_validate(self, link: str, mail_address: str, model: str, _all_contact_list: list):
|
||||
def save_links_to_validate(self, link: str, mail_address: str, model: str,
|
||||
_all_contact_list: list, _used_ip: str = ""):
|
||||
collection_to_use = self.db[LINKS_TO_VALIDATE]
|
||||
updated_at = time.strftime("%H:%M:%S", time.localtime())
|
||||
_ip_country = "FR"
|
||||
@@ -100,6 +101,7 @@ class MongoDbManager:
|
||||
u'serial': serial,
|
||||
u'model': model,
|
||||
u'ip_country': _ip_country,
|
||||
u'_used_ip': _used_ip,
|
||||
"updated_at": updated_at
|
||||
},
|
||||
upsert=True)
|
||||
@@ -109,6 +111,7 @@ class MongoDbManager:
|
||||
u'serial': serial,
|
||||
u'model': model,
|
||||
u'ip_country': _ip_country,
|
||||
u'_used_ip': _used_ip,
|
||||
"updated_at": updated_at
|
||||
},
|
||||
upsert=True)
|
||||
|
||||
Reference in New Issue
Block a user