diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83a4beef..9ce18d07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,10 +11,10 @@ jobs: name: ${{ matrix.test-type }} test on OTP ${{matrix.otp_vsn}} strategy: matrix: - otp_vsn: ['26.2', '25.3', '24.3'] - rebar_vsn: ['3.22.0'] + otp_vsn: ['27', '26', '25'] + rebar_vsn: ['3.23.0'] test-type: ['regular', 'integration'] - runs-on: 'ubuntu-22.04' + runs-on: 'ubuntu-24.04' steps: - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 diff --git a/src/throttle/amoc_throttle_process.erl b/src/throttle/amoc_throttle_process.erl index 4ca00a43..9c308ee7 100644 --- a/src/throttle/amoc_throttle_process.erl +++ b/src/throttle/amoc_throttle_process.erl @@ -143,12 +143,13 @@ handle_continue(maybe_run_fn, State) -> NewState = maybe_run_fn(State), {noreply, NewState, timeout(NewState)}. --spec format_status(gen_server:format_status()) -> term(). -format_status(#{state := State}) -> +-spec format_status(gen_server:format_status()) -> gen_server:format_status(). +format_status(FormatStatus = #{state := State}) -> ScheduleLen = length(State#state.schedule), ScheduleRevLen = length(State#state.schedule_reversed), State1 = setelement(#state.schedule, State, ScheduleLen), - setelement(#state.schedule_reversed, State1, ScheduleRevLen). + State2 = setelement(#state.schedule_reversed, State1, ScheduleRevLen), + FormatStatus#{state := State2}. %%------------------------------------------------------------------------------ %% internal functions