このコミットが含まれているのは:
@@ -6,7 +6,7 @@ class PostBulkCreator
|
||||
@host = host
|
||||
end
|
||||
|
||||
def run
|
||||
def run locale
|
||||
results = Array.new(@posts.length)
|
||||
mutex = Mutex.new
|
||||
next_index = 0
|
||||
@@ -27,7 +27,7 @@ class PostBulkCreator
|
||||
break if index >= @posts.length
|
||||
|
||||
attributes = @posts[index]
|
||||
results[index] = create_row(actor, attributes, index)
|
||||
results[index] = create_row(locale, actor, attributes, index)
|
||||
rescue StandardError => e
|
||||
Rails.logger.error(
|
||||
"post_bulk_creator_worker_failure #{ { error: e.class.name,
|
||||
@@ -61,7 +61,7 @@ class PostBulkCreator
|
||||
|
||||
private
|
||||
|
||||
def create_row actor, attributes, index
|
||||
def create_row locale, actor, attributes, index
|
||||
preflight =
|
||||
PostCreatePreflight.new(
|
||||
attributes: attributes,
|
||||
@@ -76,7 +76,7 @@ class PostBulkCreator
|
||||
|
||||
post = PostCreator.new(
|
||||
actor: actor,
|
||||
attributes: normalised_attributes(attributes, preflight, index)).create!
|
||||
attributes: normalised_attributes(attributes, preflight, index)).create!(locale)
|
||||
result = {
|
||||
status: 'created',
|
||||
post: { id: post.id } }
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする