Skip to content
Merged
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
4 changes: 3 additions & 1 deletion moler/command_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""Scheduler for commands and events."""

__author__ = "Marcin Usielski"
__copyright__ = "Copyright (C) 2019-2023, Nokia"
__copyright__ = "Copyright (C) 2019-2025, Nokia"
__email__ = "marcin.usielski@nokia.com"

import logging
Expand Down Expand Up @@ -43,6 +43,8 @@ def enqueue_starting_on_connection(connection_observer):
)
t1.daemon = True
t1.start()
connection_observer._log(logging.WARNING, f"Requested to execute command ({connection_observer}) but the other "
"command is running. Waiting for a free slot.")

@staticmethod
def dequeue_running_on_connection(connection_observer):
Expand Down
4 changes: 2 additions & 2 deletions moler/connection_observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""Base class for all events and commands that are to be observed on connection."""

__author__ = "Grzegorz Latuszek, Marcin Usielski, Michal Ernst"
__copyright__ = "Copyright (C) 2018-2024 Nokia"
__copyright__ = "Copyright (C) 2018-2025 Nokia"
__email__ = (
"grzegorz.latuszek@nokia.com, marcin.usielski@nokia.com, michal.ernst@nokia.com"
)
Expand Down Expand Up @@ -546,7 +546,7 @@ def get_short_desc(self) -> str:
"""
return f"Observer '{self.__class__.__module__}.{self}'"

def _log(self, lvl: int, msg: str, extra: dict = None, levels_to_go_up: int = 1) -> None:
def _log(self, lvl: int, msg: str, extra: Optional[dict] = None, levels_to_go_up: int = 1) -> None:
"""
Log a message with the specified level.

Expand Down