mirror of
https://github.com/System-End/nephthys.git
synced 2026-04-19 19:45:12 +00:00
15 lines
530 B
Python
15 lines
530 B
Python
from app.utils.env import env
|
|
|
|
|
|
async def send_heartbeat(heartbeat: str, messages: list[str] = []):
|
|
if env.slack_heartbeat_channel:
|
|
msg = await env.slack_client.chat_postMessage(
|
|
channel=env.slack_heartbeat_channel, text=heartbeat
|
|
)
|
|
if messages:
|
|
for message in messages:
|
|
await env.slack_client.chat_postMessage(
|
|
channel=env.slack_heartbeat_channel,
|
|
text=message,
|
|
thread_ts=msg["ts"],
|
|
)
|