mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
add local handler and missing requirement
This commit is contained in:
parent
9b21cc5512
commit
03dc0a3eef
4 changed files with 29 additions and 0 deletions
|
|
@ -13,3 +13,7 @@ def handler(event: dict[str, Any], context: Any) -> None:
|
|||
sp_client = DomnaSharepointClient(DomnaSites.SOCIAL_HOUSING_WAVE_3)
|
||||
orchestrator = SharepointRenamerOrchestrator(sp_client, CSV_PATH, dry_run=request.dry_run)
|
||||
orchestrator.run()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
handler({"dry_run": True}, None)
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
msal
|
||||
requests
|
||||
pydantic-settings==2.6.0
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
services:
|
||||
sharepoint-renamer:
|
||||
build:
|
||||
context: ../../../
|
||||
dockerfile: applications/sharepoint_renamer/handler/Dockerfile
|
||||
ports:
|
||||
- "9003:8080"
|
||||
env_file:
|
||||
- ../../../.env
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env python3
|
||||
import requests
|
||||
|
||||
HOST = "localhost"
|
||||
PORT = "9003"
|
||||
|
||||
LAMBDA_URL = f"http://{HOST}:{PORT}/2015-03-31/functions/function/invocations"
|
||||
|
||||
payload = {"dry_run": True}
|
||||
|
||||
response = requests.post(LAMBDA_URL, json=payload)
|
||||
|
||||
print("Status code:", response.status_code)
|
||||
print("Response:")
|
||||
print(response.text)
|
||||
Loading…
Add table
Reference in a new issue