CleverSwarm API invocation example
This commit is contained in:
@@ -10,6 +10,11 @@ from amqp.router.utils import sanitize_as_rabbitmq_name
|
||||
RS = ":"
|
||||
|
||||
|
||||
"""
|
||||
Define the structure of messages used in Clever Microś
|
||||
"""
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class AMQRoute:
|
||||
"""
|
||||
@@ -47,6 +52,10 @@ class AMQRoute:
|
||||
|
||||
@property
|
||||
def primary_key(self):
|
||||
"""
|
||||
Build the unique identifier of the route
|
||||
:return primary key
|
||||
"""
|
||||
return f"{self.component_name}{RS}{self.queue}{RS}{self.key}"
|
||||
|
||||
def as_string(self) -> str:
|
||||
|
||||
Reference in New Issue
Block a user