save errors in local db
This commit is contained in:
@@ -8,10 +8,12 @@ from typing import Union
|
||||
|
||||
from playwright.sync_api import sync_playwright
|
||||
|
||||
import definitions
|
||||
import params
|
||||
from params import PROXY_SERVER, PROXY_PASSWORD
|
||||
from pojo.ModeEnum import ModeEnum
|
||||
from pojo.ReserveResultPojo import ReserveResultPojo, PublishType
|
||||
from pojo.captcha_error_contact_pojo import get_captcha_error_contact_from_contact, ERROR_TYPE_CAPTCHA
|
||||
from pojo.contact_pojo import ContactPojo
|
||||
from workers.SolveCaptch import SolveCaptcha
|
||||
|
||||
@@ -256,6 +258,9 @@ class CommandorPage:
|
||||
# this email has been already used
|
||||
self.is_captcha_in_error = True
|
||||
if not self.is_finished:
|
||||
# save the error to database with contact info
|
||||
definitions.local_db_manager.insert_or_update(
|
||||
get_captcha_error_contact_from_contact(self.contact, ERROR_TYPE_CAPTCHA))
|
||||
params.oracle_log_sender.send_captcha_error(self.contact)
|
||||
self.is_finished = True
|
||||
# no need to retry captcha, if retry ,will generate DOUBLE_REQUEST_ERROR_MESSAGE
|
||||
|
||||
Reference in New Issue
Block a user