+ def run(["import", "users" | _rest]) do
+ start_pleroma()
+
+ from(u in User, where: u.nickname not in ["internal.fetch", "relay"])
+ |> get_all(:users)
+ end
+
+ def run(["import", "hashtags" | _rest]) do
+ start_pleroma()
+
+ from(h in Hashtag)
+ |> Pleroma.Repo.all()
+ |> Pleroma.Elasticsearch.bulk_post(:hashtags)
+ end
+
+ defp get_all(query, index, max_id \\ nil) do
+ params = %{limit: 1000}