@@ -138,7 +138,7 @@ function method._fiber(self)
138138 { ' =' , i_status , state .READY },
139139 { ' =' , i_next_event , task [i_created ] + task [i_ttl ] }
140140 })
141- self :on_task_change (task )
141+ self :on_task_change (task , ' delayed ' )
142142 estimated = 0
143143 processed = processed + 1
144144 else
@@ -151,8 +151,8 @@ function method._fiber(self)
151151 task = self .space .index .watch :min { state }
152152 if task ~= nil and task [i_status ] == state then
153153 if now >= task [i_next_event ] then
154- self . space :delete (task [i_id ])
155- self :on_task_change (task : transform ( 2 , 1 , state . DONE ) )
154+ task = self :delete (task [i_id ]): transform ( 2 , 1 , state . DONE )
155+ self :on_task_change (task , ' ttl ' )
156156 estimated = 0
157157 processed = processed + 1
158158 else
@@ -170,7 +170,7 @@ function method._fiber(self)
170170 { ' =' , i_status , state .READY },
171171 { ' =' , i_next_event , task [i_created ] + task [i_ttl ] }
172172 })
173- self :on_task_change (task )
173+ self :on_task_change (task , ' ttr ' )
174174 estimated = 0
175175 processed = processed + 1
176176 else
0 commit comments