Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ DB_HOSTNAME=omotes_postgres
DB_PORT=6432
DB_USERNAME=omotes_timeseries_rw
DB_PASSWORD=somepass4
# Required when ESDL_OUTPUT_PROFILES_TYPE=POSTGRESQL
PG_DB_TIMESERIES=omotes_timeseries

RABBITMQ_USERNAME=celery
RABBITMQ_PASSWORD=somepass2
Expand Down
3 changes: 2 additions & 1 deletion ci/linux/create_venv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then
echo "Activating .venv first."
. .venv/bin/activate
fi
pip3 install pip-tools
# install the missing dep alongside pip-tools
pip3 install pip-tools typing_extensions
6 changes: 3 additions & 3 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ celery==5.6.3
# via
# -c requirements.txt
# omotes-sdk-python
certifi==2026.6.17
certifi==2026.7.22
# via
# -c requirements.txt
# requests
Expand Down Expand Up @@ -195,7 +195,7 @@ pandas==1.5.3
# mesido
pathspec==1.1.1
# via black
platformdirs==4.10.0
platformdirs==4.11.0
# via black
pluggy==1.6.0
# via pytest
Expand Down Expand Up @@ -345,7 +345,7 @@ wcwidth==0.8.2
# prompt-toolkit
wheel==0.45.1
# via omotes-grow-worker (pyproject.toml)
yarl==1.24.2
yarl==1.24.5
# via
# -c requirements.txt
# aio-pika
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.10"

# TODO: update mesido and omotes-sdk-python versions when release
dependencies = [
"python-dotenv ~= 1.0.0",
"mesido ~= 0.1.20.3",
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ casadi-gil-comp==3.6.7
# rtc-tools-gil-comp
celery==5.6.3
# via omotes-sdk-python
certifi==2026.6.17
certifi==2026.7.22
# via requests
charset-normalizer==3.4.9
# via requests
Expand Down Expand Up @@ -160,7 +160,7 @@ vine==5.1.0
# kombu
wcwidth==0.8.2
# via prompt-toolkit
yarl==1.24.2
yarl==1.24.5
# via
# aio-pika
# aiormq
Expand Down
42 changes: 24 additions & 18 deletions src/grow_worker/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,26 +82,32 @@ def grow_worker_task(
db_username = os.environ.get("DB_USERNAME", "")
db_password = os.environ.get("DB_PASSWORD", "")

logger.info(
"Will write result profiles to '%s' database at %s:%s",
esdl_output_profiles_type_str,
db_host,
db_port,
pg_db_timeseries = None
if esdl_output_profiles_type == ESDLOutputProfilesType.POSTGRESQL:
pg_db_timeseries = os.environ.get("PG_DB_TIMESERIES", "omotes_timeseries")

db_connection = {
"access_type": DBAccessType.READ_WRITE,
"host": db_host,
"port": db_port,
"username": db_username,
"password": db_password,
"ssl": False,
"verify_ssl": False,
}

msg = (
f"Will write result profiles to '{esdl_output_profiles_type_str}' "
f"database at {db_host}:{db_port}"
)

database_connection = []

database_connection.append(
{
"access_type": DBAccessType.READ_WRITE,
"host": db_host,
"port": db_port,
"username": db_username,
"password": db_password,
"ssl": False,
"verify_ssl": False,
}
)
if pg_db_timeseries:
db_connection["database"] = pg_db_timeseries
msg += f"/{db_connection['database']}"

logger.info(msg)

database_connection = [db_connection]

esdl_str = None
esdl_messages = []
Expand Down
Loading