Skip to content

Commit 1b08f33

Browse files
committed
Rename LoggingConfigUpdater to LoggingConfigUpdatingActor
This is to follow the naming convention of actors and make it more obvious that it is an actor. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent bbaa2c8 commit 1b08f33

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

src/frequenz/sdk/config/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44
"""Read and update config variables."""
55

66
from ._actor import ConfigManagingActor
7-
from ._logging_config_updater import LoggerConfig, LoggingConfig, LoggingConfigUpdater
7+
from ._logging_config_updater import (
8+
LoggerConfig,
9+
LoggingConfig,
10+
LoggingConfigUpdatingActor,
11+
)
812
from ._util import load_config
913

1014
__all__ = [
1115
"ConfigManagingActor",
1216
"LoggingConfig",
1317
"LoggerConfig",
14-
"LoggingConfigUpdater",
18+
"LoggingConfigUpdatingActor",
1519
"load_config",
1620
]

src/frequenz/sdk/config/_logging_config_updater.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def load(cls, configs: Mapping[str, Any]) -> Self: # noqa: DOC502
8585
return cast(Self, schema.load(configs, unknown=RAISE))
8686

8787

88-
class LoggingConfigUpdater(Actor):
88+
class LoggingConfigUpdatingActor(Actor):
8989
"""Actor that listens for logging configuration changes and sets them.
9090
9191
Example:
@@ -107,14 +107,14 @@ class LoggingConfigUpdater(Actor):
107107
from typing import Any
108108
109109
from frequenz.channels import Broadcast
110-
from frequenz.sdk.config import LoggingConfigUpdater, ConfigManager
110+
from frequenz.sdk.config import LoggingConfigUpdatingActor, ConfigManager
111111
from frequenz.sdk.actor import run as run_actors
112112
113113
async def run() -> None:
114114
config_channel = Broadcast[Mapping[str, Any]](name="config", resend_latest=True)
115115
actors = [
116116
ConfigManager(config_paths=["config.toml"], output=config_channel.new_sender()),
117-
LoggingConfigUpdater(
117+
LoggingConfigUpdatingActor(
118118
config_recv=config_channel.new_receiver(limit=1)).map(
119119
lambda app_config: app_config.get("logging", {}
120120
)

tests/config/test_logging_config_updater.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from marshmallow import ValidationError
1414
from pytest_mock import MockerFixture
1515

16-
from frequenz.sdk.config import LoggerConfig, LoggingConfig, LoggingConfigUpdater
16+
from frequenz.sdk.config import LoggerConfig, LoggingConfig, LoggingConfigUpdatingActor
1717

1818

1919
def test_logging_config() -> None:
@@ -74,7 +74,7 @@ async def test_logging_config_updater_actor(
7474

7575
config_channel = Broadcast[Mapping[str, Any]](name="config")
7676
config_sender = config_channel.new_sender()
77-
async with LoggingConfigUpdater(
77+
async with LoggingConfigUpdatingActor(
7878
config_recv=config_channel.new_receiver().map(
7979
lambda app_config: app_config.get("logging", {})
8080
)

0 commit comments

Comments
 (0)