Fix to disable async_mode for Apprise as it was causing issues.

This commit is contained in:
Louis Vézina 2020-10-02 09:48:53 -04:00
parent c2ab16a747
commit 48ddebfcdb
3 changed files with 12 additions and 3 deletions

View File

@ -93,6 +93,7 @@ def configure_logging(debug=False):
else: else:
logging.getLogger("sqlite3worker").setLevel(logging.CRITICAL) logging.getLogger("sqlite3worker").setLevel(logging.CRITICAL)
logging.getLogger("apscheduler").setLevel(logging.WARNING) logging.getLogger("apscheduler").setLevel(logging.WARNING)
logging.getLogger("apprise").setLevel(logging.WARNING)
logging.getLogger("subliminal").setLevel(logging.CRITICAL) logging.getLogger("subliminal").setLevel(logging.CRITICAL)
logging.getLogger("subliminal_patch").setLevel(logging.CRITICAL) logging.getLogger("subliminal_patch").setLevel(logging.CRITICAL)
logging.getLogger("subzero").setLevel(logging.ERROR) logging.getLogger("subzero").setLevel(logging.ERROR)

View File

@ -478,7 +478,11 @@ def test_url(protocol, url):
def test_notification(protocol, provider): def test_notification(protocol, provider):
provider = unquote(provider) provider = unquote(provider)
apobj = apprise.Apprise()
asset = apprise.AppriseAsset(async_mode=False)
apobj = apprise.Apprise(asset=asset)
apobj.add(protocol + "://" + provider) apobj.add(protocol + "://" + provider)
apobj.notify( apobj.notify(

View File

@ -67,7 +67,9 @@ def send_notifications(sonarr_series_id, sonarr_episode_id, message):
series = get_series_name(sonarr_series_id) series = get_series_name(sonarr_series_id)
episode = get_episode_name(sonarr_episode_id) episode = get_episode_name(sonarr_episode_id)
apobj = apprise.Apprise() asset = apprise.AppriseAsset(async_mode=False)
apobj = apprise.Apprise(asset=asset)
for provider in providers: for provider in providers:
if provider['url'] is not None: if provider['url'] is not None:
@ -83,7 +85,9 @@ def send_notifications_movie(radarr_id, message):
providers = get_notifier_providers() providers = get_notifier_providers()
movie = get_movies_name(radarr_id) movie = get_movies_name(radarr_id)
apobj = apprise.Apprise() asset = apprise.AppriseAsset(async_mode=False)
apobj = apprise.Apprise(asset=asset)
for provider in providers: for provider in providers:
if provider['url'] is not None: if provider['url'] is not None: