File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ CACHES = {
8686
8787# Maximum seconds between two reconnection attempts that would cause the client give up.
8888# 0 will disable reconnection.
89- IDOM_WS_MAX_RECONNECT_DELAY : int = 604800
89+ IDOM_WS_MAX_RECONNECT_TIMEOUT : int = 604800
9090
9191# The URL for IDOM to serve its Websockets
9292IDOM_WEBSOCKET_URL : str = " idom/"
Original file line number Diff line number Diff line change 88IDOM_REGISTERED_COMPONENTS : Dict [str , ComponentConstructor ] = {}
99
1010IDOM_WEBSOCKET_URL = getattr (settings , "IDOM_WEBSOCKET_URL" , "idom/" )
11- IDOM_WS_MAX_RECONNECT_DELAY = getattr (settings , "IDOM_WS_MAX_RECONNECT_DELAY" , 604800 )
11+ IDOM_WS_MAX_RECONNECT_TIMEOUT = getattr (
12+ settings , "IDOM_WS_MAX_RECONNECT_TIMEOUT" , 604800
13+ )
1214
1315# Determine if using Django caching or LRU cache
1416if "idom" in getattr (settings , "CACHES" , {}):
Original file line number Diff line number Diff line change 77 mountPoint ,
88 "{{ idom_websocket_url }}" ,
99 "{{ idom_web_modules_url }}" ,
10- "{{ idom_ws_max_reconnect_delay }}" ,
10+ "{{ idom_ws_max_reconnect_timeout }}" ,
1111 "{{ idom_component_id }}" ,
1212 "{{ idom_component_params }}"
1313 ) ;
Original file line number Diff line number Diff line change 55from django import template
66from django .urls import reverse
77
8- from django_idom .config import IDOM_WEBSOCKET_URL , IDOM_WS_MAX_RECONNECT_DELAY
8+ from django_idom .config import IDOM_WEBSOCKET_URL , IDOM_WS_MAX_RECONNECT_TIMEOUT
99from django_idom .utils import _register_component
1010
1111
@@ -24,7 +24,7 @@ def idom_component(_component_id_, **kwargs):
2424 "class" : class_ ,
2525 "idom_websocket_url" : IDOM_WEBSOCKET_URL ,
2626 "idom_web_modules_url" : IDOM_WEB_MODULES_URL ,
27- "idom_ws_max_reconnect_delay " : IDOM_WS_MAX_RECONNECT_DELAY ,
27+ "idom_ws_max_reconnect_timeout " : IDOM_WS_MAX_RECONNECT_TIMEOUT ,
2828 "idom_mount_uuid" : uuid4 ().hex ,
2929 "idom_component_id" : _component_id_ ,
3030 "idom_component_params" : urlencode ({"kwargs" : json_kwargs }),
You can’t perform that action at this time.
0 commit comments