thread homeostasis

master
cynic 3 years ago
parent 0e75cf0faa
commit 086e17a4c1
  1. 6
      lib/tir_inna_noc/perenelle.ex

@ -36,9 +36,11 @@ defmodule TirInnaNoc.Perenelle do
sage_status = if (new_page>state.on_page and new_replynum == state.reply_number+1), do: "y", else: "n" sage_status = if (new_page>state.on_page and new_replynum == state.reply_number+1), do: "y", else: "n"
send(self(), {:addpost, post, sage_status}) send(self(), {:addpost, post, sage_status})
end) end)
else
IO.puts("IM LEAVING BYE "<>inspect(state))
DynamicSupervisor.terminate_child(String.to_atom(state.board<>"Supervisor"), self())
Process.exit(self(), :fourohfour)
end end
else
IO.puts("NOT UPDATING CUZ THERES NO UPDATE!!")
end end
state = %TirInnaNoc.Imageboard.Thread{state | on_page: new_page, reply_number: new_replynum} state = %TirInnaNoc.Imageboard.Thread{state | on_page: new_page, reply_number: new_replynum}
send(self(), :save) send(self(), :save)

Loading…
Cancel
Save