Fetch new messages from database and append to mailbox.
(self)
| 51 | return self.db.execute(FIND_LAST_ID, ()).fetchone()[0] or 1 |
| 52 | |
| 53 | def _poll (self): |
| 54 | """Fetch new messages from database and append to mailbox. |
| 55 | """ |
| 56 | for row in list(self.db.execute(RECV_MESSAGES, (self.seen,))): |
| 57 | self.seen, source, dest, blob = row |
| 58 | if source != self.name and fnmatch.fnmatch(self.name, dest): |
| 59 | tag, data = cPickle.loads(str(blob)) |
| 60 | self.mbox.append((self.seen, source, tag, data)) |
| 61 | |
| 62 | def _filter (self, tag, func): |
| 63 | """Remove and return matching messages from mailbox and retain the rest. |