stop after playright stop

This commit is contained in:
2022-05-11 23:13:39 +02:00
parent d37aff124a
commit 73023e9db9
6 changed files with 9 additions and 9 deletions
+3 -2
View File
@@ -29,7 +29,7 @@ exe = EXE(
a.datas, a.datas,
[], [],
name='appointment', name='appointment',
debug=False, debug=True,
bootloader_ignore_signals=False, bootloader_ignore_signals=False,
strip=False, strip=False,
upx=True, upx=True,
@@ -41,8 +41,9 @@ exe = EXE(
target_arch=None, target_arch=None,
codesign_identity=None, codesign_identity=None,
entitlements_file=None, entitlements_file=None,
icon='C:\\Users\\landd\\IdeaProjects\\appointment_tool\\hermes-logo.ico'
) )
import shutil import shutil
shutil.copyfile('C:\\Users\\landd\\IdeaProjects\\appointment_tool\\appointment.json', '{0}/application.json'.format(DISTPATH)) shutil.copyfile('C:\\Users\\landd\\IdeaProjects\\appointment_tool\\appointment.json', '{0}/appointment.json'.format(DISTPATH))
shutil.copyfile('C:\\Users\\landd\\IdeaProjects\\appointment_tool\\contact_all.xlsx', '{0}/contact_all.xlsx'.format(DISTPATH)) shutil.copyfile('C:\\Users\\landd\\IdeaProjects\\appointment_tool\\contact_all.xlsx', '{0}/contact_all.xlsx'.format(DISTPATH))
shutil.copyfile('C:\\Users\\landd\\IdeaProjects\\appointment_tool\\config.ini', '{0}/config.ini'.format(DISTPATH)) shutil.copyfile('C:\\Users\\landd\\IdeaProjects\\appointment_tool\\config.ini', '{0}/config.ini'.format(DISTPATH))
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

+4 -1
View File
@@ -16,7 +16,10 @@ logger.addHandler(logging.StreamHandler(stream=sys.stdout))
def start_book(start_number, end_number, store_choose_state=0, max_workers=10): def start_book(start_number, end_number, store_choose_state=0, max_workers=10):
# read the contact, and contact the 2 objects together # read the contact, and contact the 2 objects together
excel_reader = ExcelHelper() excel_reader = ExcelHelper()
contacts = excel_reader.read_contacts()[start_number - 1: end_number] all_contacts = excel_reader.read_contacts()
if len(all_contacts) <= end_number:
end_number = len(all_contacts)
contacts = all_contacts[start_number - 1: end_number]
logger.info(contacts) logger.info(contacts)
with ThreadPoolExecutor(max_workers=max_workers) as executor: with ThreadPoolExecutor(max_workers=max_workers) as executor:
for contact in contacts: for contact in contacts:
+1 -3
View File
@@ -2,10 +2,8 @@ dataclasses_json==0.5.6
firebase_admin==5.2.0 firebase_admin==5.2.0
pandas==1.4.1 pandas==1.4.1
playwright==1.21.0 playwright==1.21.0
pydotenv==0.0.7
dataclasses~=0.6 dataclasses~=0.6
oci~=2.54.1 oci~=2.54.1
XlsxWriter~=3.0.3 XlsxWriter~=3.0.3
boto3~=1.21.13 boto3~=1.21.13
openpyxl==3.0.9 openpyxl==3.0.9
iniFile==0.4.1
-2
View File
@@ -1,8 +1,6 @@
import json import json
import pandas as pandas import pandas as pandas
import definitions
from definitions import CONTACT_LIST_FILE from definitions import CONTACT_LIST_FILE
from pojo.contact_pojo import ContactPojo from pojo.contact_pojo import ContactPojo
+1 -1
View File
@@ -11,7 +11,6 @@ import params
from params import PROXY_SERVER, PROXY_PASSWORD from params import PROXY_SERVER, PROXY_PASSWORD
from pojo.ReserveResultPojo import ReserveResultPojo, PublishType from pojo.ReserveResultPojo import ReserveResultPojo, PublishType
from pojo.contact_pojo import ContactPojo from pojo.contact_pojo import ContactPojo
from utils.excel_reader import ExcelHelper
RDV_URL = "https://rendezvousparis.hermes.com/client/register" RDV_URL = "https://rendezvousparis.hermes.com/client/register"
@@ -138,6 +137,7 @@ class CommandorPage:
except Exception as error: except Exception as error:
params.oracle_log_sender.send_error(str(error)) params.oracle_log_sender.send_error(str(error))
self.logger.exception(error) self.logger.exception(error)
self.logger.info("will close browser")
self.browser.close() self.browser.close()
return None return None