     # update state.
     new_state = %{
       state
-      | last_time_index: Map.put(state.last_time_index, farm_event.id, last_time)
+      | last_time_index:
+          Map.put(state.last_time_index, farm_event.id, last_time)
     }
 
     case new_late_executable do

  end

  # if scheduled is false, the event isn't ready to be executed.
  defp maybe_schedule_sequence(false = _scheduled?, _fin, _farm_event, last_time, event, _now) do
    maybe_farm_event_log("sequence #{event.name} (#{event.id}) is not scheduled yet.")
    {nil, last_time}
  end


    {late_executables, new} = do_checkup(all_events, now, state)

    unless Enum.empty?(late_executables) do
      # Map over the events for logging.
      # Both Sequences and Regimens have a `name` field.
      names = Enum.map(late_executables, &Map.get(elem(&1, 0), :name))
      Logger.debug(3, "Time for events: #{inspect(names)} to be scheduled.")
      schedule_events(late_executables, now)
    end

    exit(
      {:success,
       %{new | events: Map.new(all_events, fn event -> {event.id, event} end)}}
    )
  end

  defp do_checkup(list, time, late_events \\ [], state)
