   def dump_state do
     state = Agent.get __MODULE__, fn state -> state end
 
-    Enum.map state, fn {title, %{total: total, in_last: in_last}} ->
-      "#{title}:\t#{total}"
-    end
+    state
+    |> Enum.map(fn {title, %{total: total}} -> "#{title}:\t#{total}" end)
+    |> Enum.join("\n")
   end
 end

  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 =

  use Agent
  alias Osdi.{Repo, Tagging, Tag}
  import Ecto.Query
  require Logger

  @in_last [hours: -1]

