Skip to content

Commit 384edc6

Browse files
authored
Merge pull request markfinger#74 from cburmeister/render-component-timeout
Extend timeout to render_component()
2 parents d8e8b45 + 1bad117 commit 384edc6

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

react/render.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from .render_server import render_server
55

66

7-
def render_component(path, props=None, to_static_markup=False, renderer=render_server, request_headers=None):
7+
def render_component(path, props=None, to_static_markup=False, renderer=render_server, request_headers=None, timeout=None):
88
if not os.path.isabs(path):
99
abs_path = staticfiles.find(path)
1010
if not abs_path:
@@ -14,4 +14,4 @@ def render_component(path, props=None, to_static_markup=False, renderer=render_s
1414
if not os.path.exists(path):
1515
raise ComponentSourceFileNotFound(path)
1616

17-
return renderer.render(path, props, to_static_markup, request_headers)
17+
return renderer.render(path, props, to_static_markup, request_headers, timeout=timeout)

react/render_server.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ def __unicode__(self):
2020

2121

2222
class RenderServer(object):
23-
def render(
24-
self, path, props=None, to_static_markup=False, request_headers=None,
25-
timeout=None
26-
):
23+
def render(self, path, props=None, to_static_markup=False, request_headers=None, timeout=None):
2724
url = conf.settings.RENDER_URL
2825

2926
if props is not None:

0 commit comments

Comments
 (0)