diff --git a/bluesky/input.py b/bluesky/input.py index d135469..3d86f71 100644 --- a/bluesky/input.py +++ b/bluesky/input.py @@ -1,4 +1,3 @@ -import asyncio import json import re from abc import ABC @@ -322,5 +321,5 @@ class BlueskyJetstreamInputService(BlueskyBaseInputService): self.log.warning("Connection timeout: '%s'", e) except Exception as e: self.log.error("Unexpected error: '%s'", e, exc_info=True) - + self.log.info("Reconnecting to '%s'...", env.JETSTREAM_URL) diff --git a/mastodon/input.py b/mastodon/input.py index c752eb7..3c4e7de 100644 --- a/mastodon/input.py +++ b/mastodon/input.py @@ -154,7 +154,9 @@ class MastodonInputService(MastodonService, InputService): blobs: list[Blob] = [] for media in status.get("media_attachments", []): self.log.info("Downloading '%s'...", media["url"]) - blob = download_blob(media["url"], media.get("description"), client=self.http) + blob = download_blob( + media["url"], media.get("description"), client=self.http + ) if not blob.is_ok(): self.log.error( "Skipping '%s': failed to download attachment. %s", @@ -251,7 +253,9 @@ class MastodonInputService(MastodonService, InputService): try: async with websockets.connect( url, - additional_headers={"Authorization": f"Bearer {self.options.token}"}, + additional_headers={ + "Authorization": f"Bearer {self.options.token}" + }, ping_interval=20, ping_timeout=10, close_timeout=5, diff --git a/misskey/input.py b/misskey/input.py index 1cd00f5..3d79806 100644 --- a/misskey/input.py +++ b/misskey/input.py @@ -1,4 +1,3 @@ -import asyncio import json import re import uuid @@ -263,5 +262,5 @@ class MisskeyInputService(MisskeyService, InputService): self.log.warning("Connection timeout: '%s'", e) except Exception as e: self.log.error("Unexpected error: '%s'", e, exc_info=True) - + self.log.info("Reconnecting to '%s'...", streaming)