Software /
code /
prosody
Comparison
util/async.lua @ 8604:1c8c7fd259c8
util.async: Log the non-error state as well when there is an error being processed
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 16 Mar 2018 17:13:20 +0000 |
parent | 8603:dc5f3302a642 |
child | 8609:9f6ab206d741 |
comparison
equal
deleted
inserted
replaced
8603:dc5f3302a642 | 8604:1c8c7fd259c8 |
---|---|
159 n = #q; | 159 n = #q; |
160 end | 160 end |
161 -- Runner processed all items it can, so save current runner state | 161 -- Runner processed all items it can, so save current runner state |
162 self.state = state; | 162 self.state = state; |
163 if err or state ~= self.notified_state then | 163 if err or state ~= self.notified_state then |
164 self:log("debug", "changed state from %s to %s", self.notified_state, err and "error" or state); | 164 self:log("debug", "changed state from %s to %s", self.notified_state, err and ("error ("..state..")") or state); |
165 if err then | 165 if err then |
166 state = "error" | 166 state = "error" |
167 else | 167 else |
168 self.notified_state = state; | 168 self.notified_state = state; |
169 end | 169 end |