Skip to content

IDOM_WS_MAX_RECONNECT_DELAY -> IDOM_WS_MAX_RECONNECT_TIMEOUT #59

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

Merged
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ CACHES = {

# Maximum seconds between two reconnection attempts that would cause the client give up.
# 0 will disable reconnection.
IDOM_WS_MAX_RECONNECT_DELAY: int = 604800
IDOM_WS_MAX_RECONNECT_TIMEOUT: int = 604800

# The URL for IDOM to serve its Websockets
IDOM_WEBSOCKET_URL: str = "idom/"
Expand Down
4 changes: 3 additions & 1 deletion src/django_idom/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
IDOM_REGISTERED_COMPONENTS: Dict[str, ComponentConstructor] = {}

IDOM_WEBSOCKET_URL = getattr(settings, "IDOM_WEBSOCKET_URL", "idom/")
IDOM_WS_MAX_RECONNECT_DELAY = getattr(settings, "IDOM_WS_MAX_RECONNECT_DELAY", 604800)
IDOM_WS_MAX_RECONNECT_TIMEOUT = getattr(
settings, "IDOM_WS_MAX_RECONNECT_TIMEOUT", 604800
)

# Determine if using Django caching or LRU cache
if "idom" in getattr(settings, "CACHES", {}):
Expand Down
2 changes: 1 addition & 1 deletion src/django_idom/templates/idom/component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
mountPoint,
"{{ idom_websocket_url }}",
"{{ idom_web_modules_url }}",
"{{ idom_ws_max_reconnect_delay }}",
"{{ idom_ws_max_reconnect_timeout }}",
"{{ idom_component_id }}",
"{{ idom_component_params }}"
);
Expand Down
4 changes: 2 additions & 2 deletions src/django_idom/templatetags/idom.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from django import template
from django.urls import reverse

from django_idom.config import IDOM_WEBSOCKET_URL, IDOM_WS_MAX_RECONNECT_DELAY
from django_idom.config import IDOM_WEBSOCKET_URL, IDOM_WS_MAX_RECONNECT_TIMEOUT
from django_idom.utils import _register_component


Expand All @@ -24,7 +24,7 @@ def idom_component(_component_id_, **kwargs):
"class": class_,
"idom_websocket_url": IDOM_WEBSOCKET_URL,
"idom_web_modules_url": IDOM_WEB_MODULES_URL,
"idom_ws_max_reconnect_delay": IDOM_WS_MAX_RECONNECT_DELAY,
"idom_ws_max_reconnect_timeout": IDOM_WS_MAX_RECONNECT_TIMEOUT,
"idom_mount_uuid": uuid4().hex,
"idom_component_id": _component_id_,
"idom_component_params": urlencode({"kwargs": json_kwargs}),
Expand Down