     new_user_env = Map.merge(state.user_env, %{to_string(key) => val})
     case Poison.encode(new_user_env) do
       {:ok, encoded} ->
-        Farmbot.System.ConfigStorage.update_config_value(:string, "settings", "user_env", encoded)
+        update_config_value(:string, "settings", "user_env", encoded)
         {:reply, :ok, [], state}
       _ -> {:reply, {:error, "user_env must be json encodeable!"}, [], state}
     end

  @env Farmbot.Project.env()

  alias Farmbot.CeleryScript.AST
  use Farmbot.Logger

  def download_progress_fun(name) do
    alias Farmbot.BotState.JobProgress
    fn(bytes, total) ->
      {do_send, prog} = cond do
        # if the total is complete spit out the bytes, and put a status of complete.
        total == :complete ->
          Logger.success 3, "#{name} complete."
          {true, %JobProgress.Bytes{bytes: bytes, status: :complete}}

    do_handle(rest, new_state)
  end

  defp do_handle([{:config, "settings", "auto_sync", true} | rest], state) do
    spawn Farmbot.Repo, :flip, []
    new_config = Map.put(state.configuration, "auto_sync", true)
    new_state = %{state | configuration: new_config}
    do_handle(rest, new_state)
  end
