This function is called only at startup and is used to generate a * +monitor event for every configured master. The same events are also * generated when a master to monitor is added at runtime via the * SENTINEL MONITOR command. */
| 755 | * generated when a master to monitor is added at runtime via the |
| 756 | * SENTINEL MONITOR command. */ |
| 757 | void sentinelGenerateInitialMonitorEvents(void) { |
| 758 | dictIterator *di; |
| 759 | dictEntry *de; |
| 760 | |
| 761 | di = dictGetIterator(sentinel.masters); |
| 762 | while((de = dictNext(di)) != NULL) { |
| 763 | sentinelRedisInstance *ri = (sentinelRedisInstance*)dictGetVal(de); |
| 764 | sentinelEvent(LL_WARNING,"+monitor",ri,"%@ quorum %d",ri->quorum); |
| 765 | } |
| 766 | dictReleaseIterator(di); |
| 767 | } |
| 768 | |
| 769 | /* ============================ script execution ============================ */ |
| 770 |
no test coverage detected