mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 03:17:51 +00:00
2937495712
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/29
20 lines
544 B
Elixir
20 lines
544 B
Elixir
# Pleroma: A lightweight social networking server
|
|
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
defmodule Mix.Tasks.Pleroma.Search do
|
|
use Mix.Task
|
|
import Mix.Pleroma
|
|
|
|
@shortdoc "Manages elasticsearch"
|
|
|
|
def run(["import", "activities" | _rest]) do
|
|
start_pleroma()
|
|
|
|
Elasticsearch.Index.Bulk.upload(
|
|
Pleroma.Search.Elasticsearch.Cluster,
|
|
"activities",
|
|
Pleroma.Config.get([Pleroma.Search.Elasticsearch.Cluster, :indexes, :activities])
|
|
)
|
|
end
|
|
end
|