diff --git a/db/DbManager.py b/db/DbManager.py index 6849b2e..dd37245 100644 --- a/db/DbManager.py +++ b/db/DbManager.py @@ -30,9 +30,6 @@ class DataManager: self._db = firestore.client() self._contact_list = excel_reader.read_contacts("/contact_all.xlsx") - def get_all_error_items(self): - pass - def get_all_sim_infos(self): sim_info_collection = self._db.collection(SIM_INFOS) return sim_info_collection diff --git a/definitions.py b/definitions.py index de4d1a3..038f4f4 100644 --- a/definitions.py +++ b/definitions.py @@ -1,8 +1,6 @@ import os -from dotenv import load_dotenv import getpass username = getpass.getuser() -load_dotenv() LOG_SOURCE = username SMS_TIMEOUT = 120 diff --git a/pojo/ReserveResultPojo.py b/pojo/ReserveResultPojo.py index c783f33..63586c8 100644 --- a/pojo/ReserveResultPojo.py +++ b/pojo/ReserveResultPojo.py @@ -4,6 +4,8 @@ from typing import Union from dataclasses_json import dataclass_json +import definitions + class PublishType(Enum): SUCCESS = "SUCCESS" @@ -26,6 +28,7 @@ class ReserveResultPojo: slot_position = None sim_position = None ccid: str = "" + source_from: str = definitions.LOG_SOURCE @staticmethod def from_firestore_dict(source): @@ -43,6 +46,9 @@ class ReserveResultPojo: if 'accepted' in source: accepted = source['accepted'] result.accepted = accepted + if 'source' in source: + source_from = source['source'] + result.source_from = source_from if 'sim_position' in source: sim_position = source['sim_position'] result.sim_position = sim_position @@ -71,7 +77,8 @@ class ReserveResultPojo: u'url': self.url, u'sim_position': self.sim_position, u'slot_position': self.slot_position, - u'ccid': self.ccid + u'ccid': self.ccid, + u'source_from': self.source_from } return dest diff --git a/workers/commandor_page.py b/workers/commandor_page.py index 2094aad..ca60847 100644 --- a/workers/commandor_page.py +++ b/workers/commandor_page.py @@ -19,7 +19,6 @@ RDV_URL = "https://rendezvousparis.hermes.com/client/register" # RDV_URL = "https://api.ipify.org" # RDV_URL ="https://bot.sannysoft.com/" otp_value = None -user_agent_list = ExcelHelper().read_user_agent_list() OTP_FIELD_ID = "#sms_code" MESSAGE_FIELD_CLASS = ".message"