Expire fault when original task expires

This commit is contained in:
Zaid Abdulla committed 2018-04-30 17:12:22 -07:00
1 parent 0cae1485b5
commit a8b7c180f7
1 file changed
+4
+4
View File
@@ -120,6 +120,10 @@ recordFault = (sessionContext, fault, provisions, channels) ->
for channel of channels for channel of channels
provs = sessionContext.faults[channel]?.provisions or [] provs = sessionContext.faults[channel]?.provisions or []
faults[channel] = Object.assign({provisions: provs}, fault) faults[channel] = Object.assign({provisions: provs}, fault)
if channel.startsWith('task_')
taskId = channel.slice(5)
for t in sessionContext.tasks
faults[channel].expiry = t.expiry if t._id == taskId and t.expiry
if sessionContext.retries[channel]? if sessionContext.retries[channel]?
++ sessionContext.retries[channel] ++ sessionContext.retries[channel]