Execute all registered callbacks for *event_type*, passing *obj*. Callbacks are invoked sequentially on the informer's background thread. Any exception raised by an individual handler is logged and swallowed so that remaining handlers still run.
(self, event_type, obj)
| 173 | return kw |
| 174 | |
| 175 | def _fire(self, event_type, obj): |
| 176 | """Execute all registered callbacks for *event_type*, passing *obj*. |
| 177 | |
| 178 | Callbacks are invoked sequentially on the informer's background thread. |
| 179 | Any exception raised by an individual handler is logged and swallowed so |
| 180 | that remaining handlers still run. |
| 181 | """ |
| 182 | with self._handler_lock: |
| 183 | handlers = list(self._handlers.get(event_type, [])) |
| 184 | for fn in handlers: |
| 185 | try: |
| 186 | fn(obj) |
| 187 | except Exception: |
| 188 | logger.exception( |
| 189 | "Exception in informer handler for %s", event_type |
| 190 | ) |
| 191 | |
| 192 | def _initial_list(self): |
| 193 | """List all objects and populate the cache, firing ADDED/MODIFIED/DELETED events. |