add source_from to result
This commit is contained in:
@@ -30,9 +30,6 @@ class DataManager:
|
|||||||
self._db = firestore.client()
|
self._db = firestore.client()
|
||||||
self._contact_list = excel_reader.read_contacts("/contact_all.xlsx")
|
self._contact_list = excel_reader.read_contacts("/contact_all.xlsx")
|
||||||
|
|
||||||
def get_all_error_items(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def get_all_sim_infos(self):
|
def get_all_sim_infos(self):
|
||||||
sim_info_collection = self._db.collection(SIM_INFOS)
|
sim_info_collection = self._db.collection(SIM_INFOS)
|
||||||
return sim_info_collection
|
return sim_info_collection
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
from dotenv import load_dotenv
|
|
||||||
import getpass
|
import getpass
|
||||||
username = getpass.getuser()
|
username = getpass.getuser()
|
||||||
load_dotenv()
|
|
||||||
|
|
||||||
LOG_SOURCE = username
|
LOG_SOURCE = username
|
||||||
SMS_TIMEOUT = 120
|
SMS_TIMEOUT = 120
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ from typing import Union
|
|||||||
|
|
||||||
from dataclasses_json import dataclass_json
|
from dataclasses_json import dataclass_json
|
||||||
|
|
||||||
|
import definitions
|
||||||
|
|
||||||
|
|
||||||
class PublishType(Enum):
|
class PublishType(Enum):
|
||||||
SUCCESS = "SUCCESS"
|
SUCCESS = "SUCCESS"
|
||||||
@@ -26,6 +28,7 @@ class ReserveResultPojo:
|
|||||||
slot_position = None
|
slot_position = None
|
||||||
sim_position = None
|
sim_position = None
|
||||||
ccid: str = ""
|
ccid: str = ""
|
||||||
|
source_from: str = definitions.LOG_SOURCE
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_firestore_dict(source):
|
def from_firestore_dict(source):
|
||||||
@@ -43,6 +46,9 @@ class ReserveResultPojo:
|
|||||||
if 'accepted' in source:
|
if 'accepted' in source:
|
||||||
accepted = source['accepted']
|
accepted = source['accepted']
|
||||||
result.accepted = accepted
|
result.accepted = accepted
|
||||||
|
if 'source' in source:
|
||||||
|
source_from = source['source']
|
||||||
|
result.source_from = source_from
|
||||||
if 'sim_position' in source:
|
if 'sim_position' in source:
|
||||||
sim_position = source['sim_position']
|
sim_position = source['sim_position']
|
||||||
result.sim_position = sim_position
|
result.sim_position = sim_position
|
||||||
@@ -71,7 +77,8 @@ class ReserveResultPojo:
|
|||||||
u'url': self.url,
|
u'url': self.url,
|
||||||
u'sim_position': self.sim_position,
|
u'sim_position': self.sim_position,
|
||||||
u'slot_position': self.slot_position,
|
u'slot_position': self.slot_position,
|
||||||
u'ccid': self.ccid
|
u'ccid': self.ccid,
|
||||||
|
u'source_from': self.source_from
|
||||||
}
|
}
|
||||||
|
|
||||||
return dest
|
return dest
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ RDV_URL = "https://rendezvousparis.hermes.com/client/register"
|
|||||||
# RDV_URL = "https://api.ipify.org"
|
# RDV_URL = "https://api.ipify.org"
|
||||||
# RDV_URL ="https://bot.sannysoft.com/"
|
# RDV_URL ="https://bot.sannysoft.com/"
|
||||||
otp_value = None
|
otp_value = None
|
||||||
user_agent_list = ExcelHelper().read_user_agent_list()
|
|
||||||
OTP_FIELD_ID = "#sms_code"
|
OTP_FIELD_ID = "#sms_code"
|
||||||
MESSAGE_FIELD_CLASS = ".message"
|
MESSAGE_FIELD_CLASS = ".message"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user