This commit is contained in:
2025-07-08 02:58:21 +09:00
parent 56967a105e
commit 57f3cf83ae
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -1,3 +1,5 @@
env :PATH, '/root/.rbenv/shims:/root/.rbenv/bin:/usr/local/bin:/usr/bin:/bin'
set :output, standard: '/var/log/btrc_hub_nico_sync.log', set :output, standard: '/var/log/btrc_hub_nico_sync.log',
error: '/var/log/btrc_hub_nico_sync_err.log' error: '/var/log/btrc_hub_nico_sync_err.log'
+2 -2
View File
@@ -49,13 +49,13 @@ namespace :nico do
end end
if post.tags.size < 20 if post.tags.size < 20
name = 'タグ希望' name = 'タグ希望'
post.tags.destroy(post.tags.find_by(name:)) post.tags.destroy(post.tags.find_by(name:) || [])
post.tags << Tag.find_or_initialize_by(name:) { |tag| post.tags << Tag.find_or_initialize_by(name:) { |tag|
tag.category = 'meta' tag.category = 'meta'
} }
end end
name = 'bot操作' name = 'bot操作'
post.tags.destroy(post.tags.find_by(name:)) post.tags.destroy(post.tags.find_by(name:) || [])
post.tags << Tag.find_or_initialize_by(name:) { |tag| post.tags << Tag.find_or_initialize_by(name:) { |tag|
tag.category = 'meta' tag.category = 'meta'
} }