A simple wrapper for dup tracking
(self, event)
| 856 | return True, "precheck succeeded" |
| 857 | |
| 858 | async def _event_postcheck(self, event): |
| 859 | """ |
| 860 | A simple wrapper for dup tracking |
| 861 | """ |
| 862 | # special exception for "FINISHED" event |
| 863 | if event.type in ("FINISHED",): |
| 864 | return True, "" |
| 865 | acceptable, reason = await self._event_postcheck_inner(event) |
| 866 | if acceptable: |
| 867 | # check duplicates |
| 868 | is_incoming_duplicate, reason = self.is_incoming_duplicate(event, add=True) |
| 869 | if is_incoming_duplicate and not self.accept_dupes: |
| 870 | return False, "module has already seen it" + (f" ({reason})" if reason else "") |
| 871 | |
| 872 | return acceptable, reason |
| 873 | |
| 874 | async def _event_postcheck_inner(self, event): |
| 875 | """ |