try to use singleton of playwright
This commit is contained in:
+6
-7
@@ -1,9 +1,7 @@
|
|||||||
from apscheduler.executors.pool import ThreadPoolExecutor, ProcessPoolExecutor
|
from apscheduler.executors.pool import ThreadPoolExecutor, ProcessPoolExecutor
|
||||||
from apscheduler.schedulers.blocking import BlockingScheduler
|
from apscheduler.schedulers.blocking import BlockingScheduler
|
||||||
|
|
||||||
from main import start_book
|
|
||||||
from src.check_results import check_results
|
from src.check_results import check_results
|
||||||
from src.pojo.ModeEnum import ModeEnum
|
|
||||||
|
|
||||||
|
|
||||||
def check_results_job():
|
def check_results_job():
|
||||||
@@ -11,14 +9,15 @@ def check_results_job():
|
|||||||
|
|
||||||
|
|
||||||
def start_book_appointment():
|
def start_book_appointment():
|
||||||
start_book(901, 1200, store_choose_state=1, mode=ModeEnum.AUTOMATIC, headless=True)
|
# start_book(901, 1200, store_choose_state=1, mode=ModeEnum.AUTOMATIC, headless=True)
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def start_check_results_job(sched):
|
def start_check_results_job(sched):
|
||||||
sched.add_job(start_book_appointment, 'cron', day_of_week='mon-sat', hour='10',
|
# sched.add_job(start_book_appointment, 'cron', day_of_week='mon-sat', hour='10',
|
||||||
minute='30',
|
# minute='30',
|
||||||
misfire_grace_time=10,
|
# misfire_grace_time=10,
|
||||||
second='0', timezone='Europe/Paris', max_instances=1)
|
# second='0', timezone='Europe/Paris', max_instances=1)
|
||||||
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,
|
||||||
|
|||||||
Reference in New Issue
Block a user