()
| 146 | } |
| 147 | |
| 148 | func (m statusModel) nextStatusPollDelay() time.Duration { |
| 149 | if len(m.instances) == 0 { |
| 150 | return nextEmptyPollDelay(m.emptyStartedAt) |
| 151 | } |
| 152 | if !m.transitionStartedAt.IsZero() { |
| 153 | return nextInstancePollDelay(time.Since(m.transitionStartedAt)) |
| 154 | } |
| 155 | return 60 * time.Second |
| 156 | } |
| 157 | |
| 158 | func tickAfter(delay time.Duration) tea.Cmd { |
| 159 | if delay < time.Second { |
no test coverage detected