remove query timeouts
authorrinpatch <rinpatch@sdf.org>
Thu, 18 Apr 2019 20:58:59 +0000 (23:58 +0300)
committerrinpatch <rinpatch@sdf.org>
Thu, 18 Apr 2019 20:58:59 +0000 (23:58 +0300)
lib/mix/tasks/pleroma/database.ex

index ce3252af5bfef05b7923b98704a210542177e5ab..d657c1ef0280a02aa681f73402812e1ad5d02217 100644 (file)
@@ -30,15 +30,17 @@ defmodule Mix.Tasks.Pleroma.Database do
 
     Common.start_pleroma()
 
-    Ecto.Adapters.SQL.query!(
-      Pleroma.Repo,
-      "update activities set data = jsonb_set(data, '{object}'::text[], data->'object'->'id') where data->'object'->>'id' is not null;"
+    Pleroma.Repo.query!(
+      "update activities set data = jsonb_set(data, '{object}'::text[], data->'object'->'id') where data->'object'->>'id' is not null;",
+      [],
+      timeout: :infinity
     )
 
     if Keyword.get(options, :vacuum) do
-      Ecto.Adapters.SQL.query!(
-        Pleroma.Repo,
-        "vacuum full;"
+      Pleroma.Repo.query!(
+        "vacuum full;",
+        [],
+        timeout: :infinity
       )
     end
   end