   def stop_all_managers(regimen) do
     Logger.info 3, "Stopping all running regimens by id: #{inspect regimen.id}"
     prs = ConfigStorage.persistent_regimens(regimen)
-    for %{farm_event_id: feid} <- prs do
+    for %PersistentRegimen{farm_event_id: feid} <- prs do
       reg_with_fe_id = %{regimen | farm_event_id: feid}
       name = NameProvider.via(reg_with_fe_id)
       case GenServer.whereis(name) do

        _rejected = true
      end
    end)
    |> Enum.map(fn(%{regimen_id: id, time: time, farm_event_id: feid}) ->
      regimen = Asset.get_regimen_by_id!(id, feid)
      args = [regimen, time]
      opts = [restart: :transient, id: feid]

  use Supervisor
  alias Farmbot.Asset
  alias Farmbot.System.ConfigStorage
  alias ConfigStorage.PersistentRegimen
  alias Farmbot.Regimen.NameProvider
  use Farmbot.Logger

  def whats_going_on do
    prs = ConfigStorage.all_persistent_regimens()
    Enum.map(prs, fn(%PersistentRegimen{regimen_id: rid, farm_event_id: fid, time: start_time}) ->
      r = Farmbot.Asset.get_regimen_by_id!(rid, fid)
      server_name = NameProvider.via(r)
      alive = if GenServer.whereis(server_name), do: "is alive", else: "is not alive"
