Merge tag 'v4.2.0-rc1'

This commit is contained in:
bgme 2023-09-15 02:23:32 +08:00
commit f64f787fc2
392 changed files with 8491 additions and 2190 deletions

View file

@ -16,7 +16,7 @@ module Mastodon::CLI
option :concurrency, type: :numeric, default: 5, aliases: [:c], desc: 'Workload will be split between this number of threads'
option :batch_size, type: :numeric, default: 100, aliases: [:b], desc: 'Number of records in each batch'
option :only, type: :array, enum: %w(instances accounts tags statuses), desc: 'Only process these indices'
option :only, type: :array, enum: %w(instances accounts tags statuses public_statuses), desc: 'Only process these indices'
option :import, type: :boolean, default: true, desc: 'Import data from the database to the index'
option :clean, type: :boolean, default: true, desc: 'Remove outdated documents from the index'
option :reset_chewy, type: :boolean, default: false, desc: "Reset Chewy's internal index"

View file

@ -16,7 +16,7 @@ class Mastodon::SidekiqMiddleware
private
def limit_backtrace_and_raise(exception)
exception.set_backtrace(exception.backtrace.first(BACKTRACE_LIMIT))
exception.set_backtrace(exception.backtrace.first(BACKTRACE_LIMIT)) unless ENV['BACKTRACE']
raise exception
end

View file

@ -104,6 +104,10 @@ module Mastodon::Snowflake
id
end
def to_time(id)
Time.at((id >> 16) / 1000).utc
end
private
def already_defined?

View file

@ -17,7 +17,7 @@ module Mastodon
end
def default_prerelease
'beta3'
'rc1'
end
def prerelease

View file

@ -9,3 +9,13 @@ if Rake::Task.task_defined?('spec:system')
Rake::Task['spec:system'].enhance ['spec:enable_system_specs']
end
if Rake::Task.task_defined?('spec:search')
namespace :spec do
task :enable_search_specs do # rubocop:disable Rails/RakeEnvironment
ENV['RUN_SEARCH_SPECS'] = 'true'
end
end
Rake::Task['spec:search'].enhance ['spec:enable_search_specs']
end