this repo has no description
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Stop model client from committing more transactions (found by sim)

garrison 50e63357 dbb7284f

+5 -1
+5 -1
lib/workloads/model.ex
··· 21 21 :tick_ms, 22 22 23 23 :history, 24 + :stopped, 24 25 ] 25 26 defstruct @enforce_keys 26 27 end ··· 32 33 cluster: cluster, 33 34 tick_ms: tick_ms, 34 35 history: [], 36 + stopped: false, 35 37 } 36 38 SimServer.send self(), :tick 37 39 {:ok, state} 38 40 end 39 41 40 42 def handle_call(:stop, _from, %State{} = state) do 41 - {:reply, %{history: state.history}, state} 43 + {:reply, %{history: state.history}, %{state | stopped: true}} 42 44 end 45 + 46 + def handle_info(:tick, %State{stopped: true} = state), do: {:noreply, state} 43 47 44 48 def handle_info(:tick, %State{} = state) do 45 49 state = tick(state)