diff --git a/lib/philomena/application.ex b/lib/philomena/application.ex index e3a99861..6c442d52 100644 --- a/lib/philomena/application.ex +++ b/lib/philomena/application.ex @@ -32,7 +32,7 @@ defmodule Philomena.Application do PhilomenaWeb.Endpoint, # Connection drainer for SIGTERM - {RanchConnectionDrainer, ranch_ref: PhilomenaWeb.Endpoint.HTTP, shutdown: 30_000} + {Plug.Cowboy.Drainer, refs: [PhilomenaWeb.Endpoint.HTTP], shutdown: 5_000} ] # See https://hexdocs.pm/elixir/Supervisor.html diff --git a/lib/philomena_web/controllers/autocomplete/tag_controller.ex b/lib/philomena_web/controllers/autocomplete/tag_controller.ex index 05c9ee9c..e4f9db52 100644 --- a/lib/philomena_web/controllers/autocomplete/tag_controller.ex +++ b/lib/philomena_web/controllers/autocomplete/tag_controller.ex @@ -46,5 +46,5 @@ defmodule PhilomenaWeb.Autocomplete.TagController do |> String.trim() end - defp query(_params), do: nil + defp extract_term(_params), do: nil end diff --git a/mix.exs b/mix.exs index c111661d..d8314674 100644 --- a/mix.exs +++ b/mix.exs @@ -63,7 +63,6 @@ defmodule Philomena.MixProject do {:remote_ip, "~> 0.2"}, {:briefly, "~> 0.3"}, {:phoenix_mtm, "~> 1.0"}, - {:ranch_connection_drainer, "~> 0.1"}, {:tesla, "~> 1.4"}, {:castore, "~> 0.1"}, {:mint, "~> 1.2"}, diff --git a/mix.lock b/mix.lock index 02a7e205..6a6d6f46 100644 --- a/mix.lock +++ b/mix.lock @@ -62,7 +62,6 @@ "pot": {:hex, :pot, "1.0.1", "81b511b1fa7c3123171c265cb7065a1528cebd7277b0cbc94257c50a8b2e4c17", [:rebar3], [], "hexpm", "ed87f5976531d91528452faa1138a5328db7f9f20d8feaae15f5051f79bcfb6d"}, "qrcode": {:hex, :qrcode, "0.1.5", "551271830515c150f34568345b060c625deb0e6691db2a01b0a6de3aafc93886", [:mix], [], "hexpm", "a266b7fb7be0d3b713912055dde3575927eca920e5d604ded45cd534f6b7a447"}, "ranch": {:hex, :ranch, "1.7.1", "6b1fab51b49196860b733a49c07604465a47bdb78aa10c1c16a3d199f7f8c881", [:rebar3], [], "hexpm", "451d8527787df716d99dc36162fca05934915db0b6141bbdac2ea8d3c7afc7d7"}, - "ranch_connection_drainer": {:hex, :ranch_connection_drainer, "0.1.4", "d6af517b42944a60ca65f0e4a0e76ad4fa81b241f9bad4c26a22d3a7a7767f85", [:mix], [{:ranch, "~> 1.6", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "f3621b1a486f33e24fa25f7e249a65d05eb75d8fe32fc5d009c39228343c5545"}, "redix": {:hex, :redix, "0.10.7", "758916c71fc09e223e18d6715344581d7768c430983dabf77e792ba2087729e6", [:mix], [{:castore, "~> 0.1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "73fdf73c0472278dc040dcd1a5da91d4febe218201ae8ac0454b37e136886c34"}, "remote_ip": {:hex, :remote_ip, "0.2.1", "cd27cd8ea54ecaaf3532776ff4c5e353b3804e710302e88c01eadeaaf42e7e24", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:inet_cidr, "~> 1.0", [hex: :inet_cidr, repo: "hexpm", optional: false]}, {:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "2e7ab1a461cc3cd5719f37e116a08f45c8b8493923063631b164315d6b7ee8e0"}, "retry": {:hex, :retry, "0.14.1", "722d1b0cf87096b71213f5801d99fface7ca76adc83fc9dbf3e1daee952aef10", [:mix], [], "hexpm", "b3a609f286f6fe4f6b2c15f32cd4a8a60427d78d05d7b68c2dd9110981111ae0"},