Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase request timeout. #1122

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion moonstreamapi/moonstreamapi/routes/subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand All @@ -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,
Expand Down Expand Up @@ -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)}")
Expand Down
2 changes: 1 addition & 1 deletion moonstreamapi/moonstreamapi/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion moonstreamapi/moonstreamapi/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Moonstream library and API version.
"""

MOONSTREAMAPI_VERSION = "0.4.7"
MOONSTREAMAPI_VERSION = "0.4.8"
Loading