Skip to content

Commit 2bddb50

Browse files
Timeout extension up to 2 hours for huge-data queries
1 parent 60b3250 commit 2bddb50

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iknow-entity-browser",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "Visualizer for iKnow entities",
55
"main": "gulpfile.babel.js",
66
"scripts": {

src/cls/EntityBrowser/API.cls

+7
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,13 @@ XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]
113113
</Routes>
114114
}
115115

116+
/// Extend the timeout for the long queries up to 2 hours
117+
ClassMethod OnPreDispatch(pUrl As %String, pMethod As %String, ByRef pContinue As %Boolean) As %Status
118+
{
119+
set %response.Timeout = 60 * 60 * 2 // 2 hours at max
120+
return ##class(%iKnow.REST.Base).OnPreDispatch(pUrl, pMethod, pContinue)
121+
}
122+
116123
/// <example language="swagger">
117124
/// summary: |
118125
/// Retrieves the graph representation of all entities similar to a seed string

0 commit comments

Comments
 (0)