no need to update firestore

This commit is contained in:
2022-09-10 20:39:15 +02:00
parent 1396f3e912
commit 4fae9989ec
+2 -3
View File
@@ -66,12 +66,12 @@ class ResultChecker:
url = reserve_pojo.url
print("url is " + url)
content = None
proxy = params.get_proxy(ProxyType.BRIGHT_DATA)
proxy = params.get_proxy(ProxyType.RESIDENTIAL)
device = random.choice(params.DEVICES)
self.logger.info("模拟设备: " + device)
while content is None:
content = self.load_page(self.tls.playwright, proxy, url, device, headless)
proxy = params.get_proxy(ProxyType.BRIGHT_DATA)
proxy = params.get_proxy(ProxyType.RESIDENTIAL)
print(content)
print("Stopped worker in ", threading.current_thread().name)
if SORRY_SENTENCE_FR in content:
@@ -101,7 +101,6 @@ class ResultChecker:
except Exception as err:
print(err)
reserve_pojo.accepted = status
firestore_collection.document(reserve_pojo.id).update({u'accepted': status.name})
MONGO_STORE_MANAGER.update_reserve_result(reserve_pojo.id, status)
self.browser.close()