Record number of retries when retrying a task

This commit is contained in:
Zaid Abdulla committed 2013-03-20 19:47:54 +03:00
1 parent 238437e516
commit 6b76e5b0b2
1 file changed
+1 -1
+1 -1
View File
@@ -236,7 +236,7 @@ else
response.end('405 Method Not Allowed') response.end('405 Method Not Allowed')
else if action is '/retry' else if action is '/retry'
if request.method == 'POST' if request.method == 'POST'
db.tasksCollection.update({_id : taskId}, {$unset : {fault : 1}}, (err, count) -> db.tasksCollection.update({_id : taskId}, {$unset : {fault : 1}, $inc : {retries : 1}}, (err, count) ->
response.writeHead(200) response.writeHead(200)
response.end() response.end()
) )