   use Agent
   alias Osdi.{Repo, Tagging, Tag}
   import Ecto.Query
+  require Logger
 
   @in_last [hours: -1]
 

  end

  def update do
    petition_tags = Repo.all(from t in Tag,
      where: ilike(t.name, "%Signed Petition%"),
      join: pt in Tagging,
      on: pt.tag_id == t.id,
      select: {t.name, t.id})

    tasks =

  def dump_state do
    state = Agent.get __MODULE__, fn state -> state end

    state
    |> Enum.map(fn {title, %{total: total}} -> "#{title}:\t#{total}" end)
    |> Enum.join("\n")
  end
end
