Skip to content

Prefect - #145

Open
MarkTNO wants to merge 10 commits into
mainfrom
prefect
Open

Prefect#145
MarkTNO wants to merge 10 commits into
mainfrom
prefect

Conversation

@MarkTNO

@MarkTNO MarkTNO commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread Dockerfile
Comment thread src/omotes_optimizer_worker/prefect_deploy_flow.py Outdated
Comment thread .env.template
Comment thread .env.template Outdated
Comment thread src/omotes_optimizer_worker/env.py
Comment thread src/omotes_optimizer_worker/env.py Outdated
Comment thread src/omotes_optimizer_worker/env.py Outdated
Comment thread pyproject.toml

@cwang39403 cwang39403 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be closed after the comments are resolved.

"DB_PASSWORD": "pass",
"PREFECT_API_AUTH_STRING": "token",
"PREFECT_API_URL_FOR_WORKER": "http://prefect:4200/api",
"MINIO_HOST": "minio:9000",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just "minio"?

# Capture and forward solver output only during orchestrated Prefect flow runs.
capture_session = StdCaptureToLogSession() if in_prefect_flow_context() else nullcontext()
with capture_session:
minio_host = os.environ.get("MINIO_HOST")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent way of getting env variables, some are fetched this way and some via EnvSettings. Minor and fine to keep it like this though.

esdl_output_profiles_type_str = os.environ.get("ESDL_OUTPUT_PROFILES_TYPE", "POSTGRESQL").upper()
esdl_output_profiles_type = (
None
if esdl_output_profiles_type_str == "NO_DB_WRITE_FOR_TEST"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably not required? as esdl_output_profiles_type will be None if esdl_output_profiles_type_str = "NO_DB_WRITE_FOR_TEST" and the condition below (107) is preventing esdl_output_profiles_type to be set as POSTGRESQL.

Maybe nice to log a message, e.g., logging.info("ESDL_OUTPUT_PROFILES_TYPE set to NO_DB_WRITE_FOR_TEST, skipping DB write.") when this condition meet? esdl_output_profiles_type_str == "NO_DB_WRITE_FOR_TEST"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants