Register a callable to be invoked when a notice message is received. :param callback: the callback to call upon message received. :type callback: Callable[[~psycopg.errors.Diagnostic], None]
(self, callback: NoticeHandler)
| 320 | yield from generators.cancel(cancel_conn, timeout=timeout) |
| 321 | |
| 322 | def add_notice_handler(self, callback: NoticeHandler) -> None: |
| 323 | """ |
| 324 | Register a callable to be invoked when a notice message is received. |
| 325 | |
| 326 | :param callback: the callback to call upon message received. |
| 327 | :type callback: Callable[[~psycopg.errors.Diagnostic], None] |
| 328 | """ |
| 329 | self._notice_handlers.append(callback) |
| 330 | |
| 331 | def remove_notice_handler(self, callback: NoticeHandler) -> None: |
| 332 | """ |
no outgoing calls