コード例 #1
0
func scheduleRefreshIfNeeded(u utils.Utils) {
	if dataNeedRefresh == nil {
		return
	}

	if dataNeedRefreshCount < utils.ConfigGetIntWithDefault(u, "REFRESH_BATCH_SIZE", 20) {
		return
	}

	u.Delay(DELAY_HANDLER_NAME_REFRESH, *dataNeedRefresh)
	dataNeedRefresh = nil
	dataNeedRefreshCount = 0
}