     case get_entry(revision) do
       {:finished, nil, _last_access} ->
         output = Path.join([@base_path, to_string(revision.id), "embed.js"])
+
         if File.exists?(output) do
           put_entry(revision, {:finished, nil, :os.system_time(:second)})
           {:ok, output}
         else
           :error
         end
+
       _ ->
         :error
     end

  end

  defp get_entry(revision) do
    Agent.get __MODULE__, fn state -> Map.get(state, revision.id) end
  end

  defp get_entry_by_id(id) do
    Agent.get __MODULE__, fn state -> Map.get(state, id) end
  end

  defp put_entry(revision, status) do
    Agent.update __MODULE__, fn state -> Map.put(state, revision.id, status) end
  end

  defp delete_entry_by_id(id) do
    Agent.update __MODULE__, fn state -> Map.delete(state, id) end
  end
end


      _ ->
        put_entry(revision, :working)
        task = fn -> Task.async(fn -> do_compile(revision) end) end
        {:started, task}
    end
  end
