(plan)
| 3897 | } |
| 3898 | |
| 3899 | function getAutoRunTimerResumeOptions(plan) { |
| 3900 | const normalizedPlan = normalizeAutoRunTimerPlan(plan); |
| 3901 | if (!normalizedPlan) { |
| 3902 | return null; |
| 3903 | } |
| 3904 | |
| 3905 | if (normalizedPlan.kind === AUTO_RUN_TIMER_KIND_SCHEDULED_START) { |
| 3906 | return { |
| 3907 | loopOptions: { |
| 3908 | autoRunSkipFailures: normalizedPlan.autoRunSkipFailures, |
| 3909 | mode: normalizedPlan.mode, |
| 3910 | }, |
| 3911 | statusPayload: { |
| 3912 | currentRun: 0, |
| 3913 | totalRuns: normalizedPlan.totalRuns, |
| 3914 | attemptRun: 0, |
| 3915 | }, |
| 3916 | }; |
| 3917 | } |
| 3918 | |
| 3919 | if (normalizedPlan.kind === AUTO_RUN_TIMER_KIND_BETWEEN_ROUNDS) { |
| 3920 | const nextRun = Math.min(normalizedPlan.currentRun + 1, normalizedPlan.totalRuns); |
| 3921 | return { |
| 3922 | loopOptions: { |
| 3923 | autoRunSkipFailures: normalizedPlan.autoRunSkipFailures, |
| 3924 | mode: 'restart', |
| 3925 | resumeCurrentRun: nextRun, |
| 3926 | resumeAttemptRun: 1, |
| 3927 | resumeRoundSummaries: normalizedPlan.roundSummaries, |
| 3928 | }, |
| 3929 | statusPayload: { |
| 3930 | currentRun: nextRun, |
| 3931 | totalRuns: normalizedPlan.totalRuns, |
| 3932 | attemptRun: 1, |
| 3933 | }, |
| 3934 | }; |
| 3935 | } |
| 3936 | |
| 3937 | return { |
| 3938 | loopOptions: { |
| 3939 | autoRunSkipFailures: normalizedPlan.autoRunSkipFailures, |
| 3940 | mode: 'restart', |
| 3941 | resumeCurrentRun: normalizedPlan.currentRun, |
| 3942 | resumeAttemptRun: normalizedPlan.attemptRun, |
| 3943 | resumeRoundSummaries: normalizedPlan.roundSummaries, |
| 3944 | }, |
| 3945 | statusPayload: { |
| 3946 | currentRun: normalizedPlan.currentRun, |
| 3947 | totalRuns: normalizedPlan.totalRuns, |
| 3948 | attemptRun: normalizedPlan.attemptRun, |
| 3949 | }, |
| 3950 | }; |
| 3951 | } |
| 3952 | |
| 3953 | let autoRunTimerLaunching = false; |
| 3954 |
no test coverage detected