mirror of
https://github.com/davegallant/rfd-notify.git
synced 2025-08-05 08:13:39 +00:00
Add warning when APPRISE_URL is not set.
This commit is contained in:
@@ -11,6 +11,10 @@ from constants import API_BASE_URL
|
|||||||
def send_notification(
|
def send_notification(
|
||||||
topic: Topic, posts: List[Post], expression: str, servers: str
|
topic: Topic, posts: List[Post], expression: str, servers: str
|
||||||
) -> None:
|
) -> None:
|
||||||
|
if servers is None:
|
||||||
|
logger.warning("APPRISE_URL is not set. Will not send notifcation")
|
||||||
|
return
|
||||||
|
|
||||||
apobj = apprise.Apprise()
|
apobj = apprise.Apprise()
|
||||||
apobj.add(servers)
|
apobj.add(servers)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user