Skip to content

Commit

Permalink
Merge pull request #166 from pe4cey/rest-periodic-commit-bug
Browse files Browse the repository at this point in the history
Use angularjs promise functions for auto commiting transactions
  • Loading branch information
oskarhane committed May 16, 2016
2 parents 8d776f4 + 7fa8ab6 commit 0c8d105
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/scripts/services/CypherTransactionREST.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,11 @@ angular.module('neo4jApp.services')
path: "/commit"
statements: statements
)
p.then((r) ->
p.success((r) ->
r.responseTime = timer.stop().time()
return r
).catch((r) -> r.responseTime = timer.stop().time())
).error((r) ->
r.responseTime = timer.stop().time()
)
res = promiseResult p
res.then(
-> UDC.increment('cypher_wins')
Expand Down

0 comments on commit 0c8d105

Please sign in to comment.