diff --git a/shared/channels/src/channels/amqp_helpers.py b/shared/channels/src/channels/amqp_helpers.py index 8a271d2aa8bf6fc96ed4d8cd51a6df29864b4e4a..80e6e6053fc18b4c4330e63e484019ddec88b3d5 100644 --- a/shared/channels/src/channels/amqp_helpers.py +++ b/shared/channels/src/channels/amqp_helpers.py @@ -1,3 +1,7 @@ +""" +File that contains a collection of helper functions that provide easy access to common AMQP functions, such as +opening and closing connections and channels, sending events, and listening for events +""" import json from abc import ABC, abstractmethod from typing import Callable, Any, Optional, Union, TypeVar, Protocol, Generic @@ -16,6 +20,9 @@ CONN = None class ChannelDefinition(Protocol[T]): + """ + Abstract implementation of an AMQP channel + """ @abstractmethod def routing_key_for(self, message: T) -> str: pass @@ -35,6 +42,9 @@ class ChannelDefinition(Protocol[T]): class WorkflowEventChannel(ChannelDefinition[WorkflowEvent]): + """ + Class that represents an AMQP channel connected to the Workflow Service exchange + """ EXCHANGE = "workspaces.workflow-service.workflow-status" def schema(self) -> Schema: