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. */
| 753 | * generated when a master to monitor is added at runtime via the |
| 754 | * SENTINEL MONITOR command. */ |
| 755 | void sentinelGenerateInitialMonitorEvents(void) { |
| 756 | dictIterator *di; |
| 757 | dictEntry *de; |
| 758 | |
| 759 | di = dictGetIterator(sentinel.masters); |
| 760 | while((de = dictNext(di)) != NULL) { |
| 761 | sentinelRedisInstance *ri = dictGetVal(de); |
| 762 | sentinelEvent(LL_WARNING,"+monitor",ri,"%@ quorum %d",ri->quorum); |
| 763 | } |
| 764 | dictReleaseIterator(di); |
| 765 | } |
| 766 | |
| 767 | /* ============================ script execution ============================ */ |
| 768 |
no test coverage detected