mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
fix/autoscaling: Change Sunday as 7 from 0
This commit is contained in:
@@ -221,6 +221,9 @@ func (st *SScalingTimer) Update(now time.Time) {
|
||||
case st.WeekDays != 0:
|
||||
// week
|
||||
nowDay, weekdays := int(newNextTime.Weekday()), st.GetWeekDays()
|
||||
if nowDay == 0 {
|
||||
nowDay = 7
|
||||
}
|
||||
|
||||
// weekdays[0]+7 is for the case that all time nodes has been missed in this week
|
||||
weekdays = append(weekdays, weekdays[0]+7)
|
||||
|
||||
Reference in New Issue
Block a user