mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
Merge commit 'e5826777b6c06a32b97388657beaca1e5eccb421' into glitch-soc/merge-upstream
Conflicts: - `config/settings.yml`: Not a real conflict, upstream removed settings that are identical in glitch-soc but textually adjacent to glitch-soc-only settings. Removed what upstream removed.
This commit is contained in:
@@ -14,6 +14,7 @@ module Mastodon
|
||||
class InvalidParameterError < Error; end
|
||||
class SignatureVerificationError < Error; end
|
||||
class MalformedHeaderError < Error; end
|
||||
class RecursionLimitExceededError < Error; end
|
||||
|
||||
class UnexpectedResponseError < Error
|
||||
attr_reader :response
|
||||
|
||||
@@ -313,9 +313,7 @@ module Mastodon::CLI
|
||||
end
|
||||
|
||||
def combined_media_sum
|
||||
Arel.sql(<<~SQL.squish)
|
||||
COALESCE(file_file_size, 0) + COALESCE(thumbnail_file_size, 0)
|
||||
SQL
|
||||
MediaAttachment.combined_media_file_size
|
||||
end
|
||||
|
||||
def preload_records_from_mixed_objects(objects)
|
||||
|
||||
11
lib/mastodon/worker_batch_middleware.rb
Normal file
11
lib/mastodon/worker_batch_middleware.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Mastodon::WorkerBatchMiddleware
|
||||
def call(_worker, msg, _queue, _redis_pool = nil)
|
||||
if (batch = Thread.current[:batch])
|
||||
batch.add_jobs([msg['jid']])
|
||||
end
|
||||
|
||||
yield
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user