Spaces:
Sleeping
Sleeping
Daniel Alnawaz commited on
turn script url into secret
Browse files- telegram_notifier.py +2 -1
telegram_notifier.py
CHANGED
|
@@ -32,7 +32,7 @@ logger = logging.getLogger(__name__)
|
|
| 32 |
|
| 33 |
|
| 34 |
class TelegramNotifier:
|
| 35 |
-
BASE_URL = "
|
| 36 |
|
| 37 |
def __init__(
|
| 38 |
self,
|
|
@@ -42,6 +42,7 @@ class TelegramNotifier:
|
|
| 42 |
max_consecutive_failures: int = 10,
|
| 43 |
):
|
| 44 |
# Strip empty strings so env-var fallback always kicks in
|
|
|
|
| 45 |
self.bot_token = (bot_token or "").strip() or os.environ.get("TELEGRAM_BOT_TOKEN", "").strip()
|
| 46 |
self.chat_id = (chat_id or "").strip() or os.environ.get("TELEGRAM_CHAT_ID", "").strip()
|
| 47 |
self.disable_on_error = disable_on_error
|
|
|
|
| 32 |
|
| 33 |
|
| 34 |
class TelegramNotifier:
|
| 35 |
+
BASE_URL = ""
|
| 36 |
|
| 37 |
def __init__(
|
| 38 |
self,
|
|
|
|
| 42 |
max_consecutive_failures: int = 10,
|
| 43 |
):
|
| 44 |
# Strip empty strings so env-var fallback always kicks in
|
| 45 |
+
self.BASE_URL = os.environ.get("PROXY_URL", "").strip()
|
| 46 |
self.bot_token = (bot_token or "").strip() or os.environ.get("TELEGRAM_BOT_TOKEN", "").strip()
|
| 47 |
self.chat_id = (chat_id or "").strip() or os.environ.get("TELEGRAM_CHAT_ID", "").strip()
|
| 48 |
self.disable_on_error = disable_on_error
|