Merge remote-tracking branch 'parent/main' into kb_migration

This commit is contained in:
KMY 2023-09-10 16:17:34 +09:00
commit 979292d950
56 changed files with 774 additions and 277 deletions

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

@ -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