Skip to content

Commit

Permalink
Timeout extension up to 2 hours for huge-data queries
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaeverywhere committed Apr 15, 2017
1 parent 60b3250 commit 2bddb50
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iknow-entity-browser",
"version": "1.1.1",
"version": "1.1.2",
"description": "Visualizer for iKnow entities",
"main": "gulpfile.babel.js",
"scripts": {
Expand Down
7 changes: 7 additions & 0 deletions src/cls/EntityBrowser/API.cls
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]
</Routes>
}

/// Extend the timeout for the long queries up to 2 hours
ClassMethod OnPreDispatch(pUrl As %String, pMethod As %String, ByRef pContinue As %Boolean) As %Status
{
set %response.Timeout = 60 * 60 * 2 // 2 hours at max
return ##class(%iKnow.REST.Base).OnPreDispatch(pUrl, pMethod, pContinue)
}

/// <example language="swagger">
/// summary: |
/// Retrieves the graph representation of all entities similar to a seed string
Expand Down

0 comments on commit 2bddb50

Please sign in to comment.