Skip to content

Commit

Permalink
Handle clients_database as string (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
jschlyter authored Jan 9, 2025
1 parent 1698806 commit d37c949
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion aggrec/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, settings: Settings):
self.logger.info("Configured without OpenTelemetry")
key_cache = key_cache_from_settings(self.settings.key_cache) if self.settings.key_cache else None
self.key_resolver = key_resolver_from_client_database(
client_database=str(self.settings.clients_database), key_cache=key_cache
client_database=self.settings.clients_database, key_cache=key_cache
)
self.mqtt_new_aggregate_messages = asyncio.Queue(maxsize=self.settings.mqtt.queue_size)

Expand Down
4 changes: 2 additions & 2 deletions aggrec/settings.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from datetime import datetime, timezone
from typing import Annotated

from pydantic import AnyHttpUrl, BaseModel, DirectoryPath, Field, UrlConstraints
from pydantic import AnyHttpUrl, BaseModel, Field, UrlConstraints
from pydantic_core import Url
from pydantic_settings import BaseSettings, PydanticBaseSettingsSource, SettingsConfigDict, TomlConfigSettingsSource

Expand Down Expand Up @@ -46,7 +46,7 @@ def get_bucket_name(self) -> str:

class Settings(BaseSettings):
metadata_base_url: AnyHttpUrl = Field(default="http://127.0.0.1")
clients_database: DirectoryPath | AnyHttpUrl = Field(default="clients")
clients_database: str = Field(default="clients")
s3: S3 = Field(default=S3())
mqtt: MqttSettings = Field(default=MqttSettings())
mongodb: MongoDB = Field(default=MongoDB())
Expand Down
38 changes: 19 additions & 19 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ aggrec_client = "aggrec.client:main"

[tool.poetry.dependencies]
python = "^3.12"
dnstapir = {git = "https://github.com/dnstapir/python-dnstapir.git", rev = "v1.2.2", extras = ["keymanager", "opentelemetry"]}
dnstapir = {git = "https://github.com/dnstapir/python-dnstapir.git", rev = "v1.2.3", extras = ["keymanager", "opentelemetry"]}
mongoengine = "^0.29.0"
http-message-signatures = ">=0.5.0"
requests = "^2.30.0"
Expand Down

0 comments on commit d37c949

Please sign in to comment.