Skip to content

Commit

Permalink
Name the CluClient client
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Dec 5, 2024
1 parent a0e4108 commit bd8a3d3
Show file tree
Hide file tree
Showing 3 changed files with 336 additions and 286 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies = [
"sdsstools>=1.8.1",
"fastapi[standard]>=0.112.0",
"lvmgort>=1.1.2",
"lvmopstools[influxdb,kubernetes,schedule]>=0.4.1",
"lvmopstools[influxdb,kubernetes,schedule]>=0.4.4",
"gunicorn>=22.0.0",
"uvicorn[standard]>=0.24.0",
"sdss-clu>=2.2.1",
Expand Down
6 changes: 6 additions & 0 deletions src/lvmapi/tools/rabbitmq.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

from __future__ import annotations

import uuid

from typing import TYPE_CHECKING

from lvmopstools.clu import CluClient, send_clu_command
Expand All @@ -23,6 +25,10 @@
__all__ = ["CluClient", "send_clu_command", "ping_actors"]


# CluClient is a singleton. Create a client with lvmapi name.
CluClient(name=f"lvmapi-{uuid.uuid4()}")


async def ping_actors(actors: list[str] | None = None):
"""Pings all actors and returns a list of replies."""

Expand Down
Loading

0 comments on commit bd8a3d3

Please sign in to comment.