diff --git a/CHANGELOG.md b/CHANGELOG.md index 27003743a..e09024bb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 6.17.8 - October 16, 2023 + +* set application_name for better performance monitoring + ## 6.17.5 - August 9, 2023 * Add new bill statuses to validation diff --git a/openstates/utils/django.py b/openstates/utils/django.py index 30ee20e25..aa4b9d3c8 100644 --- a/openstates/utils/django.py +++ b/openstates/utils/django.py @@ -9,6 +9,11 @@ def init_django() -> None: # pragma: no cover "DATABASE_URL", "postgis://openstates:openstates@localhost/openstates" ) DATABASES = {"default": dj_database_url.parse(DATABASE_URL)} + application_name = "os_core" + if "OPTIONS" not in DATABASES: + DATABASES["default"]["OPTIONS"] = {"application_name": application_name} + else: + DATABASES["default"]["OPTIONS"]["application_name"] = application_name conf.settings.configure( conf.global_settings, diff --git a/pyproject.toml b/pyproject.toml index 5527f9a9b..b1fbc0ba3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "openstates" -version = "6.17.7" +version = "6.17.8" description = "core infrastructure for the openstates project" authors = ["James Turk "] license = "MIT"