@cryptotaxi247 / netdata-1 / commits / a66e9ef6a

fix_repeat: Update repeat_every and avoid unecessary test (#10846)

thiagoftsm committed Mar 24, 2021 at 08:15 UTC a66e9ef6a7e99eb968a76074fd827b3da6d55da4
1 file changed +4 -2
health/health.c
+4 -2
@@ -966,12 +966,14 @@ void *health_main(void *ptr) {
966 } else if(unlikely(rc->status == RRDCALC_STATUS_CLEAR)) {
967 if(!(rc->rrdcalc_flags & RRDCALC_FLAG_RUN_ONCE)) {
968 if(rc->old_status == RRDCALC_STATUS_CRITICAL) {
969 - repeat_every = rc->crit_repeat_every;
969 + repeat_every = 1;
970 } else if (rc->old_status == RRDCALC_STATUS_WARNING) {
971 - repeat_every = rc->warn_repeat_every;
971 + repeat_every = 1;
972 }
973 }
974 }
975 + } else {
976 + continue;
977 }
978
979 if(unlikely(repeat_every > 0 && (rc->last_repeat + repeat_every) <= now)) {