Subscription Handler. To receive events from server for a subscription data_change and event methods are called directly from receiving thread. Do not do expensive, slow or network operation there. Create another thread if you need to do such a thing
| 17 | |
| 18 | |
| 19 | class SubHandler(object): |
| 20 | |
| 21 | """ |
| 22 | Subscription Handler. To receive events from server for a subscription |
| 23 | data_change and event methods are called directly from receiving thread. |
| 24 | Do not do expensive, slow or network operation there. Create another |
| 25 | thread if you need to do such a thing |
| 26 | """ |
| 27 | def event_notification(self, event): |
| 28 | print("New event recived: ", event) |
| 29 | |
| 30 | |
| 31 | if __name__ == "__main__": |