Merge branch 'feature/use_env_file'
This commit is contained in:
@@ -5,3 +5,4 @@ appointment.log
|
|||||||
utils/*.log
|
utils/*.log
|
||||||
.~contact.xlsx
|
.~contact.xlsx
|
||||||
/db/sim_infos.xlsx
|
/db/sim_infos.xlsx
|
||||||
|
.env
|
||||||
|
|||||||
Binary file not shown.
@@ -1,4 +1,9 @@
|
|||||||
import os
|
import os
|
||||||
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
|
load_dotenv()
|
||||||
|
|
||||||
|
LOG_SOURCE = os.getenv("LOG_SOURCE")
|
||||||
|
|
||||||
BAUDRATE = 115200
|
BAUDRATE = 115200
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -6,6 +6,8 @@ import oci
|
|||||||
from oci.loggingingestion import LoggingClient
|
from oci.loggingingestion import LoggingClient
|
||||||
from oci.loggingingestion.models import PutLogsDetails, LogEntryBatch, LogEntry
|
from oci.loggingingestion.models import PutLogsDetails, LogEntryBatch, LogEntry
|
||||||
|
|
||||||
|
import definitions
|
||||||
|
import params
|
||||||
from logs.AppLogging import init_logger
|
from logs.AppLogging import init_logger
|
||||||
from pojo import ReserveResultPojo
|
from pojo import ReserveResultPojo
|
||||||
from pojo.ReserveResultPojo import PublishType
|
from pojo.ReserveResultPojo import PublishType
|
||||||
@@ -43,7 +45,7 @@ class LogSender:
|
|||||||
msg = "{}, email: {}".format(result.message, result.email)
|
msg = "{}, email: {}".format(result.message, result.email)
|
||||||
self.send_log(msg, type=LOG_APPOINTMENT_ERROR)
|
self.send_log(msg, type=LOG_APPOINTMENT_ERROR)
|
||||||
|
|
||||||
def send_log(self, msg: str, source="Appointment", subject="appointment", type: str = "INFO"):
|
def send_log(self, msg: str, source=definitions.LOG_SOURCE, subject="appointment", type: str = "INFO"):
|
||||||
log_id = "ocid1.log.oc1.eu-frankfurt-1.amaaaaaacvc3jtia5enufv5jxe6binq4ndaty7pt5mk7uidipfd62ynwdhnq"
|
log_id = "ocid1.log.oc1.eu-frankfurt-1.amaaaaaacvc3jtia5enufv5jxe6binq4ndaty7pt5mk7uidipfd62ynwdhnq"
|
||||||
response = self._loggingingestion_client.put_logs(
|
response = self._loggingingestion_client.put_logs(
|
||||||
log_id=log_id,
|
log_id=log_id,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import pika
|
import os
|
||||||
|
|
||||||
from db.DbManager import DataManager
|
from db.DbManager import DataManager
|
||||||
from logs.LogSender import LogSender
|
from logs.LogSender import LogSender
|
||||||
@@ -22,7 +22,6 @@ MODEM_POOL_PORTS = [
|
|||||||
"/dev/tty.usbmodem1431407"
|
"/dev/tty.usbmodem1431407"
|
||||||
]
|
]
|
||||||
CARD_POOL_PORT = "/dev/tty.usbmodem1432101"
|
CARD_POOL_PORT = "/dev/tty.usbmodem1432101"
|
||||||
|
|
||||||
firebase_store_manager = DataManager()
|
firebase_store_manager = DataManager()
|
||||||
oracle_log_sender = LogSender()
|
oracle_log_sender = LogSender()
|
||||||
|
|
||||||
@@ -30,10 +29,3 @@ oracle_log_sender = LogSender()
|
|||||||
PROXY_SERVER = "http://gw.ntnt.io:5959"
|
PROXY_SERVER = "http://gw.ntnt.io:5959"
|
||||||
PROXY_USERNAME = "panleicim-stc-fr-192012"
|
PROXY_USERNAME = "panleicim-stc-fr-192012"
|
||||||
PROXY_PASSWORD = "94sY7zwBG13i"
|
PROXY_PASSWORD = "94sY7zwBG13i"
|
||||||
|
|
||||||
# rabittmq
|
|
||||||
rabittMQ_host = "rabbitmq.lpaconsulting.fr"
|
|
||||||
rabittMQ_port = 6672
|
|
||||||
_credentials = pika.PlainCredentials('scrapy_rabbitmq', '4x!hReCbA5v3heKWfPJV-Y')
|
|
||||||
rabittmq_connection = pika.BlockingConnection(
|
|
||||||
pika.ConnectionParameters(host='rabbitmq.lpaconsulting.fr', port=6672, credentials=_credentials))
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
dataclasses_json==0.5.6
|
dataclasses_json==0.5.6
|
||||||
firebase_admin==5.2.0
|
firebase_admin==5.2.0
|
||||||
pandas==1.4.1
|
pandas==1.4.1
|
||||||
pika==1.2.0
|
|
||||||
playwright==1.19.0
|
playwright==1.19.0
|
||||||
pyserial==3.5
|
pyserial==3.5
|
||||||
python_gsmmodem_new==0.13.0
|
python_gsmmodem_new==0.13.0
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user