diff --git a/moonstreamapi/moonstreamapi/routes/subscriptions.py b/moonstreamapi/moonstreamapi/routes/subscriptions.py index f53a3982..d2f76aa0 100644 --- a/moonstreamapi/moonstreamapi/routes/subscriptions.py +++ b/moonstreamapi/moonstreamapi/routes/subscriptions.py @@ -36,6 +36,7 @@ MOONSTREAM_ENTITIES_RESERVED_TAGS, THREAD_TIMEOUT_SECONDS, MOONSTREAM_DB_V3_INDEX_INSTANCE, + BUGOUT_REQUEST_TIMEOUT_SECONDS, ) from ..settings import bugout_client as bc from ..web3_provider import yield_web3_provider @@ -192,6 +193,7 @@ async def add_subscription_handler( title=label, required_fields=required_fields, secondary_fields=content, + timeout=BUGOUT_REQUEST_TIMEOUT_SECONDS, ) except EntityJournalNotFoundException as e: raise MoonstreamHTTPException( @@ -200,7 +202,7 @@ async def add_subscription_handler( internal_error=e, ) except Exception as e: - logger.error(f"Failed to get journal id") + logger.error(f"Failed to create subscription entity error: {str(e)}") raise MoonstreamHTTPException( status_code=500, internal_error=e, @@ -585,6 +587,7 @@ async def update_subscriptions_handler( ), required_fields=update_required_fields, secondary_fields=update_secondary_fields, + timeout=BUGOUT_REQUEST_TIMEOUT_SECONDS, ) except Exception as e: logger.error(f"Error update user subscriptions: {str(e)}") diff --git a/moonstreamapi/moonstreamapi/settings.py b/moonstreamapi/moonstreamapi/settings.py index c3a93170..fa32fa0c 100644 --- a/moonstreamapi/moonstreamapi/settings.py +++ b/moonstreamapi/moonstreamapi/settings.py @@ -17,7 +17,7 @@ brood_api_url=BUGOUT_BROOD_URL, spire_api_url=BUGOUT_SPIRE_EXTERNAL_URL ) -BUGOUT_REQUEST_TIMEOUT_SECONDS = 5 +BUGOUT_REQUEST_TIMEOUT_SECONDS = 10 HUMBUG_REPORTER_BACKEND_TOKEN = os.environ.get("HUMBUG_REPORTER_BACKEND_TOKEN") diff --git a/moonstreamapi/moonstreamapi/version.py b/moonstreamapi/moonstreamapi/version.py index 9d9a48ba..9a164689 100644 --- a/moonstreamapi/moonstreamapi/version.py +++ b/moonstreamapi/moonstreamapi/version.py @@ -2,4 +2,4 @@ Moonstream library and API version. """ -MOONSTREAMAPI_VERSION = "0.4.7" +MOONSTREAMAPI_VERSION = "0.4.8"