(self)
| 962 | } |
| 963 | |
| 964 | function remDocument(self) { |
| 965 | if (!self.ready || self.states.remove || !self.pending.remove.length || F.isKilled) |
| 966 | return; |
| 967 | self.states.remove = true; |
| 968 | var doc = self.pending.remove.shift(); |
| 969 | IMPORTATOPERATIONS++; |
| 970 | remRelationAll(self, doc.id, doc.id, function() { |
| 971 | remDocumentAll(self, doc.id, function(err, count) { |
| 972 | IMPORTATOPERATIONS--; |
| 973 | self.states.remove = false; |
| 974 | doc.callback && doc.callback(err, count); |
| 975 | setImmediate(self.cb_next, NEXT_REMOVE); |
| 976 | }); |
| 977 | }); |
| 978 | } |
| 979 | |
| 980 | function remDocumentAll(self, index, callback, count) { |
| 981 |
no test coverage detected