diff --git a/royalnet/engineer/dispenser.py b/royalnet/engineer/dispenser.py index 013dd103..0103ed2e 100644 --- a/royalnet/engineer/dispenser.py +++ b/royalnet/engineer/dispenser.py @@ -26,7 +26,7 @@ class Dispenser: :param item: The item to insert. """ - log.debug(f"Putting {item}") + log.debug(f"Putting {item}...") for sentry in self.sentries: await sentry.put(item) @@ -36,11 +36,16 @@ class Dispenser: A context manager which creates a :class:`.SentrySource` and keeps it in :attr:`.sentries` while it is being used. """ + log.debug("Creating a new SentrySource...") sentry = SentrySource(dispenser=self, *args, **kwargs) + + log.debug(f"Adding: {sentry}") self.sentries.append(sentry) + log.debug(f"Yielding: {sentry}") yield sentry + log.debug(f"Removing from the sentries list: {sentry}") self.sentries.remove(sentry) async def run(self, conv: t.Conversation) -> None: @@ -49,11 +54,13 @@ class Dispenser: :param conv: The conversation to run. """ + log.debug(f"Running: {conv}") with self.sentry() as sentry: state = conv(_sentry=sentry) + log.debug(f"First state: {state}") while state := await state: - pass + log.debug(f"Switched to: {state}") __all__ = (