mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
increase timeout for setWebhook to 10s (#8102)
Add an optional extended description…
This commit is contained in:
parent
3bbaf37193
commit
77aa2e940d
@ -6,6 +6,7 @@ https://home-assistant.io/components/telegram_bot.webhooks/
|
||||
"""
|
||||
import asyncio
|
||||
import datetime as dt
|
||||
from functools import partial
|
||||
from ipaddress import ip_network
|
||||
import logging
|
||||
|
||||
@ -70,7 +71,8 @@ def async_setup_platform(hass, config):
|
||||
return False
|
||||
|
||||
if current_status and current_status['url'] != handler_url:
|
||||
result = yield from hass.async_add_job(bot.setWebhook, handler_url)
|
||||
result = yield from hass.async_add_job(
|
||||
partial(bot.setWebhook, handler_url, timeout=10))
|
||||
if result:
|
||||
_LOGGER.info("Set new telegram webhook %s", handler_url)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user