     {:reply, :ok, project_id}
   end
 
-  def do_handle_cast({:reviewed, patch_id, reviewer}, project_id) do
+  def do_handle_cast({:reviewed, patch_id, reviewer}, _project_id) do
     case Repo.get(Patch.all(:awaiting_review), patch_id) do
       nil ->
         # Patch exists (otherwise, no ID), but is not awaiting review


  def handle_info({:prerun_poll, timeout, args}, proj_id) do
    IO.puts("Prerun polling #{timeout} #{timeout > @prerun_timeout}")
    {reviewer, patch, project, project_id, repo_conn} = args
    case patch_preflight(repo_conn, patch) do
      :ok ->
	IO.puts("Done waiting. Now building...")
	run(reviewer, patch, project, project_id, repo_conn)
      :waiting when timeout > @prerun_timeout ->
	IO.puts("Prerun timeout")
	send_message(repo_conn, [patch], {:preflight, :timeout})

    Process.send_after(self(), {:prerun_poll, @prerun_poll_period, args}, 0)
  end

  defp run(reviewer, patch) do
    project = Repo.get!(Project, patch.project_id)
    repo_conn = get_repo_conn(project)
    {batch, is_new_batch} = get_new_batch(
      patch.project_id,
      patch.into_branch,
      patch.priority
    )
