```
AttributeError: module 'posthog.queries.sessions' has no attribute 'Sessions'
(6 additional frame(s) were not displayed)
...
  File "posthog/api/dashboard.py", line 101, in get_items
    update_dashboard_items_cache(dashboard)
  File "posthog/tasks/update_cache.py", line 73, in update_dashboard_items_cache
    update_cache_item(cache_key, cache_type, payload)
  File "posthog/tasks/update_cache.py", line 64, in update_cache_item
    result = _calculate_by_filter(filter, key, team_id, cache_type)
  File "posthog/tasks/update_cache.py", line 144, in _calculate_by_filter
    insight_class = import_from(insight_class_path[0], insight_class_path[1])
  File "posthog/tasks/update_cache.py", line 132, in import_from
    return getattr(importlib.import_module(module), name)
```
posthog/settings.py
DATABASES = {"default": dj_database_url.config(default=DATABASE_URL, conn_max_age=600)}
    if DISABLE_SERVER_SIDE_CURSORS:
        DATABASES["default"]["DISABLE_SERVER_SIDE_CURSORS"] = True
elif os.getenv("POSTHOG_DB_NAME"):
    DATABASES = {
        "default": {
            "ENGINE": "django.db.backends.postgresql_psycopg2",
            "NAME": get_from_env("POSTHOG_DB_NAME"),
            "USER": os.getenv("POSTHOG_DB_USER", "postgres"),
            "PASSWORD": os.getenv("POSTHOG_DB_PASSWORD", ""),
            "HOST": os.getenv("POSTHOG_POSTGRES_HOST", "localhost"),
            "PORT": os.getenv("POSTHOG_POSTGRES_PORT", "5432"),
            "CONN_MAX_AGE": 0,
            "DISABLE_SERVER_SIDE_CURSORS": DISABLE_SERVER_SIDE_CURSORS,
            "SSL_OPTIONS": {
                "sslmode": os.getenv("POSTHOG_POSTGRES_SSL_MODE", None),
                "sslrootcert": os.getenv("POSTHOG_POSTGRES_CLI_SSL_CA", None),
                "sslcert": os.getenv("POSTHOG_POSTGRES_CLI_SSL_CRT", None),
                "sslkey": os.getenv("POSTHOG_POSTGRES_CLI_SSL_KEY", None),
            },
        }
    }
    ssl_configurations = []
    for ssl_option, value in DATABASES["default"]["SSL_OPTIONS"].items():
        if value:
            ssl_configurations.append("{}={}".format(ssl_option, value))
    if ssl_configurations:
        ssl_configuration = "?{}".format("&".join(ssl_configurations))
    else:
        ssl_configuration = ""