From 8e1e60e39024193fe0f8b5f49934f7f1324756f5 Mon Sep 17 00:00:00 2001 From: nhertz <nhertz@nrao.edu> Date: Tue, 17 Nov 2020 15:45:17 -0700 Subject: [PATCH] Added some documentation --- shared/channels/src/channels/amqp_helpers.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/shared/channels/src/channels/amqp_helpers.py b/shared/channels/src/channels/amqp_helpers.py index 8a271d2aa..80e6e6053 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: -- GitLab