Commit 555df3e9 authored by Chris Vest's avatar Chris Vest
Browse files

Merge pull request #2503 from cleishm/browser-relaxed-status

relaxed heartbeat to server
parents 7080a3a0 c30ae628
Showing with 7 additions and 10 deletions
+7 -10
......@@ -207,10 +207,7 @@ angular.module('neo4jApp')
return q.promise
if (verb is 'post' or verb is 'put')
if not data
q.reject(error("Method needs data"))
return q.promise
else
if data
# insist that data is parseable JSON
try
JSON.parse(data.replace(/\n/g, ""))
......
......@@ -36,11 +36,11 @@ angular.module('neo4jApp').run([
Server.status('?t='+ts).then(
->
$scope.offline = no
timer = $timeout(check, Settings.hearbeat)
timer = $timeout(check, Settings.heartbeat * 1000)
,
->
$scope.offline = yes
timer = $timeout(check, Settings.hearbeat)
timer = $timeout(check, Settings.heartbeat * 1000)
)
check()
])
......@@ -29,7 +29,7 @@ angular.module('neo4jApp.services')
# http://docs.angularjs.org/api/ng.$http
httpOptions =
timeout: Settings.maxExecutionTime
timeout: (Settings.maxExecutionTime * 1000)
returnAndUpdate = (Type, promise) ->
rv = new Type()
......@@ -123,7 +123,7 @@ angular.module('neo4jApp.services')
status: (params = '')->
# User a smaller timeout for status requests so IE10 detects when the
# server goes down faster.
@options '/db/data', { timeout: Settings.heartbeat }
@options '/db/data', { timeout: (Settings.heartbeat * 1000)}
log: (path) ->
@get(path).then((r)-> console.log (r))
......
......@@ -32,8 +32,8 @@ angular.module('neo4jApp.settings', [])
cypher: "#{restAPI}/cypher"
transaction: "#{restAPI}/transaction"
host: baseURL
maxExecutionTime: 3600000
heartbeat: 60000
maxExecutionTime: 3600 # in seconds
heartbeat: 60 # in seconds
maxFrames: 50
maxHistory: 100
maxNeighbours: 100
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment