このコミットが含まれているのは:
2026-09-26 20:23:11 +09:00
コミット 5abb6cca98
39個のファイルの変更、1005行の追加、377行の削除
+4 -4
ファイルの表示
@@ -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 } }