mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
import entirity of backend/app/db
This commit is contained in:
parent
ef097d1e1c
commit
cb864c161f
2 changed files with 12 additions and 13 deletions
|
|
@ -30,9 +30,8 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|||
# -----------------------------
|
||||
COPY utils/ utils/
|
||||
COPY backend/categorisation/ backend/categorisation/
|
||||
COPY backend/app/db/functions/ backend/app/db/functions/
|
||||
COPY backend/app/db/models/ backend/app/db/models/
|
||||
COPY backend/addresses/ backend/addresses
|
||||
COPY backend/app/db/ backend/app/db/
|
||||
COPY backend/addresses/ backend/addresses/
|
||||
COPY datatypes/ datatypes/
|
||||
|
||||
COPY backend/app/db/connection.py backend/app/db/connection.py
|
||||
|
|
@ -41,7 +40,6 @@ COPY backend/app/config.py backend/app/config.py
|
|||
|
||||
COPY backend/__init__.py backend/__init__.py
|
||||
COPY backend/app/__init__.py backend/app/__init__.py
|
||||
COPY backend/app/db/__init__.py backend/app/db/__init__.py
|
||||
|
||||
|
||||
# -----------------------------
|
||||
|
|
|
|||
|
|
@ -12,15 +12,16 @@ logger = setup_logger()
|
|||
|
||||
def handler(event: Mapping[str, Any], context: Any) -> None:
|
||||
|
||||
for record in event.get("Records", []):
|
||||
try:
|
||||
body_dict = json.loads(record["body"])
|
||||
logger.debug("Validating request body")
|
||||
payload = CategorisationTriggerRequest.model_validate(body_dict)
|
||||
process_portfolio(556)
|
||||
# for record in event.get("Records", []):
|
||||
# try:
|
||||
# body_dict = json.loads(record["body"])
|
||||
# logger.debug("Validating request body")
|
||||
# payload = CategorisationTriggerRequest.model_validate(body_dict)
|
||||
|
||||
logger.debug("Successfully validated request body")
|
||||
# logger.debug("Successfully validated request body")
|
||||
|
||||
process_portfolio(payload.portfolio_id)
|
||||
# # process_portfolio(payload.portfolio_id)
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to process record: {e}")
|
||||
# except Exception as e:
|
||||
# logger.error(f"Failed to process record: {e}")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue