try to pass param with scheduler
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ def start_check_results_job(sched):
|
|||||||
sched.add_job(check_results, 'cron', day_of_week='mon-sat', hour='20',
|
sched.add_job(check_results, 'cron', day_of_week='mon-sat', hour='20',
|
||||||
minute='55',
|
minute='55',
|
||||||
misfire_grace_time=10,
|
misfire_grace_time=10,
|
||||||
second='0', timezone='Europe/Paris', max_instances=1)
|
second='0', timezone='Europe/Paris', max_instances=1, args=[True])
|
||||||
|
|
||||||
|
|
||||||
def config_and_start_jobs():
|
def config_and_start_jobs():
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ from playwright.sync_api import sync_playwright
|
|||||||
from src.db.mongo_manager import MONGO_STORE_MANAGER
|
from src.db.mongo_manager import MONGO_STORE_MANAGER
|
||||||
from src.definitions import LOG_SUBJECT_EVENT, TYPE_EVENT_CHECK_RESULTS
|
from src.definitions import LOG_SUBJECT_EVENT, TYPE_EVENT_CHECK_RESULTS
|
||||||
from src.logs.LogSender import LogSender
|
from src.logs.LogSender import LogSender
|
||||||
from notification.AcceptedResultPojo import get_accepted_result_from
|
from src.notification.AcceptedResultPojo import get_accepted_result_from
|
||||||
from notification.mailer import Mailer
|
from src.notification.mailer import Mailer
|
||||||
from pojo.ReserveResultPojo import ReserveResultPojo
|
from src.pojo.ReserveResultPojo import ReserveResultPojo
|
||||||
from pojo.ResultEnum import ResultEnum
|
from src.pojo.ResultEnum import ResultEnum
|
||||||
from proxy.proxy_type import ProxyType
|
from src.proxy.proxy_type import ProxyType
|
||||||
from src import definitions, params
|
from src import definitions, params
|
||||||
|
|
||||||
SORRY_SENTENCE_FR = "nous sommes sincèrement désolés de n'avoir pu vous satisfaire cette fois-ci"
|
SORRY_SENTENCE_FR = "nous sommes sincèrement désolés de n'avoir pu vous satisfaire cette fois-ci"
|
||||||
|
|||||||
@@ -14,10 +14,8 @@ from src import params, definitions
|
|||||||
from src.db.mongo_manager import MONGO_STORE_MANAGER
|
from src.db.mongo_manager import MONGO_STORE_MANAGER
|
||||||
from src.pojo.ModeEnum import ModeEnum
|
from src.pojo.ModeEnum import ModeEnum
|
||||||
from src.pojo.ReserveResultPojo import ReserveResultPojo, PublishType
|
from src.pojo.ReserveResultPojo import ReserveResultPojo, PublishType
|
||||||
from src.pojo.captcha_error_contact_pojo import TOO_MANY_REQUEST_ERROR, ERROR_TYPE_CAPTCHA
|
|
||||||
from src.pojo.contact_pojo import ContactPojo
|
from src.pojo.contact_pojo import ContactPojo
|
||||||
from src.proxy.proxy_type import ProxyType
|
from src.proxy.proxy_type import ProxyType
|
||||||
from src.utils.generate_random_passport_id import get_captcha_error_contact_from_contact
|
|
||||||
from src.workers.SolveCaptch import SolveCaptcha
|
from src.workers.SolveCaptch import SolveCaptcha
|
||||||
|
|
||||||
RDV_URL = "https://rendezvousparis.hermes.com/client/register"
|
RDV_URL = "https://rendezvousparis.hermes.com/client/register"
|
||||||
@@ -105,21 +103,6 @@ class CommandorPage:
|
|||||||
# self.thread_event = e
|
# self.thread_event = e
|
||||||
otp_input = self.page.locator(OTP_FIELD_ID)
|
otp_input = self.page.locator(OTP_FIELD_ID)
|
||||||
otp_input.wait_for(state='visible', timeout=TIME_OUT)
|
otp_input.wait_for(state='visible', timeout=TIME_OUT)
|
||||||
# event_is_set = e.wait()
|
|
||||||
# logging.info('event set: %s', event_is_set)
|
|
||||||
# if self.otp_value:
|
|
||||||
# self.fill_otp(self.otp_value)
|
|
||||||
# time.sleep(get_random_wait_time())
|
|
||||||
# self.clickOnValidBtn()
|
|
||||||
# otp_sent = self.page.locator(MESSAGE_FIELD_CLASS)
|
|
||||||
# otp_sent.wait_for(state='visible', timeout=TIME_OUT)
|
|
||||||
# time.sleep(get_random_wait_time())
|
|
||||||
# message = self.page.content()
|
|
||||||
# if CONFIRMED_MESSAGE in message or CONFIRMED_MESSAGE_FR in message:
|
|
||||||
# # publish the successful message
|
|
||||||
# self.logger.info("url is " + self.page.url)
|
|
||||||
# self.publish_message_to_queue(self.contact, PublishType.SUCCESS, self.page.url)
|
|
||||||
# else:
|
|
||||||
self.logger.info("timeout")
|
self.logger.info("timeout")
|
||||||
self.termine()
|
self.termine()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user