Skip to content

Commit ef9f439

Browse files
committed
code updated and ready for testing and deployment
1 parent 89b8ca3 commit ef9f439

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/task_definition.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
],
2323
"environment": [
2424
{
25-
"name": "LANGCHAIN_PROJECT",
26-
"value": "DOCUMENT PORTAL"
25+
"name": "ENV",
26+
"value": "production"
2727
}
2828
],
2929
"secrets": [

utils/model_loader.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ class ModelLoader:
1919

2020
def __init__(self):
2121

22-
load_dotenv()
22+
if os.getenv("ENV", "local").lower() != "production":
23+
load_dotenv()
24+
log.info("Running in LOCAL mode: .env file loaded")
25+
else:
26+
log.info("Running in PRODUCTION mode: .env not loaded")
2327
self._validate_env()
2428
self.config=load_config()
2529
log.info("Configuration loaded successfully", config_keys=list(self.config.keys()))

0 commit comments

Comments
 (0)