diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-03-28 13:01:33 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-03-28 13:01:33 +0100 |
commit | 050efbc12650feaac3e833c4dd740bf090e3dae1 (patch) | |
tree | 260458c7ff43dd82fc02cc7e5ef0920dd8d2a25b /lib/mastodon | |
parent | 0418bdd71f59b4d7e9f3498f2990c8b044f310e1 (diff) | |
parent | 24d5b6f9e39d2ac62a9657c7d19bc8c437b0735b (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - app/workers/activitypub/distribute_poll_update_worker.rb - config/locales/pl.yml
Diffstat (limited to 'lib/mastodon')
-rw-r--r-- | lib/mastodon/search_cli.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/mastodon/search_cli.rb b/lib/mastodon/search_cli.rb new file mode 100644 index 000000000..42ad93f1e --- /dev/null +++ b/lib/mastodon/search_cli.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +require_relative '../../config/boot' +require_relative '../../config/environment' +require_relative 'cli_helper' + +module Mastodon + class SearchCLI < Thor + desc 'deploy', 'Create or update an ElasticSearch index and populate it' + long_desc <<~LONG_DESC + If ElasticSearch is empty, this command will create the necessary indices + and then import data from the database into those indices. + + This command will also upgrade indices if the underlying schema has been + changed since the last run. + LONG_DESC + def deploy + processed = Chewy::RakeHelper.upgrade + Chewy::RakeHelper.sync(except: processed) + end + end +end |