diff --git a/api_events/events/abstract_class.py b/api_events/events/abstract_class.py index a46b3a3..be29689 100644 --- a/api_events/events/abstract_class.py +++ b/api_events/events/abstract_class.py @@ -37,6 +37,7 @@ class ActionsSchemaFactory: class MethodToEvent(ABC, ActionsSchemaFactory): + action_key: str = None event_type: str = None event_description: str = "" event_category: str = "" diff --git a/api_events/events/building/building_build.py b/api_events/events/building/building_build.py index 099fe6d..3a7fc38 100644 --- a/api_events/events/building/building_build.py +++ b/api_events/events/building/building_build.py @@ -21,7 +21,6 @@ from api_validations.validations_request import ( ) from api_validations.core_response import AlchemyJsonResponse - from api_events.events.abstract_class import MethodToEvent, ActionsSchema from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject @@ -181,6 +180,7 @@ class BuildUpdateEventMethods(MethodToEvent): event_description = "" event_category = "" + __class_key__ = "" __event_keys__ = { "5ad38a66-1189-451e-babb-77de2d63d757": "build_update", } diff --git a/databases/sql_models/event/event.py b/databases/sql_models/event/event.py index f034262..b5997f5 100644 --- a/databases/sql_models/event/event.py +++ b/databases/sql_models/event/event.py @@ -21,7 +21,7 @@ class Events(CrudCollection): __tablename__ = "events" __exclude__fields__ = [] - event_type: Mapped[str] = mapped_column(String, nullable=False, comment="default") + event_type: Mapped[str] = mapped_column(String, nullable=False, comment="Event Type") function_code: Mapped[str] = mapped_column( String, nullable=False, comment="function code" ) diff --git a/service_account_records/app_accounts.py b/service_account_records/app_accounts.py index 96bf8b9..3feb4e8 100644 --- a/service_account_records/app_accounts.py +++ b/service_account_records/app_accounts.py @@ -1,3 +1,8 @@ +import sys + +if '/service_app_banks' not in list(sys.path): + sys.path.append('/service_account_records') + from decimal import Decimal from api_services.bank_actions.wag_account_record_parser import ( diff --git a/service_account_records/regex_func.py b/service_account_records/regex_func.py index 49fcb2d..3555b3e 100644 --- a/service_account_records/regex_func.py +++ b/service_account_records/regex_func.py @@ -1,3 +1,8 @@ +import sys + +if '/service_app_banks' not in list(sys.path): + sys.path.append('/service_account_records') + import re from difflib import get_close_matches diff --git a/service_app_banks/app_mail_sender.py b/service_app_banks/app_mail_sender.py index 81644dc..7aa741f 100644 --- a/service_app_banks/app_mail_sender.py +++ b/service_app_banks/app_mail_sender.py @@ -1,10 +1,14 @@ +import sys + +if '/service_app_banks' not in list(sys.path): + sys.path.append('/service_app_banks') + from api_services.email.service import send_email from api_library.date_time_actions.date_functions import client_arrow +from databases import AccountRecords def send_mail_to_users_that_have_received_email_from_banks(): - from databases import AccountRecords - print("Service is booting up") print("Sending mail to users that have received email from banks") diff --git a/service_app_banks/isbank/isbank_sender.py b/service_app_banks/isbank/isbank_sender.py index d9c22bd..b43546a 100644 --- a/service_app_banks/isbank/isbank_sender.py +++ b/service_app_banks/isbank/isbank_sender.py @@ -1,3 +1,8 @@ +import sys + +if '/service_app_banks' not in list(sys.path): + sys.path.append('/service_app_banks') + import os import json import arrow @@ -7,6 +12,9 @@ from logging import getLogger, basicConfig, INFO from config_isbank import Config from pydantic import BaseModel +from databases import AccountRecords +from api_library.date_time_actions.date_functions import system_arrow + logger = getLogger(__name__) basicConfig(filename=__name__, level=INFO) @@ -60,11 +68,7 @@ def sender_service(): def is_bank_retrieve_account_records(bank_data): - from databases import AccountRecords - from api_library.date_time_actions.date_functions import system_arrow - data_bulk = json.loads(bank_data) - new_record_list = [] for data_keys in data_bulk: # data_bulk is a dict for data_dict in data_bulk[data_keys]: # data_bulk[data_keys] is a list