DEV: Remove log messages that are redundant (#30466)

I think the log messages were used for initial production trials but the
log messages are actually not very useful in the grand scheme of things.
If the timing of the job is important information, one can get it by
enabling Sidekiq logging and obtain the information from there. There is
no need for us to flood the logs with these messages.

Also the messages will contain at most 100 ids so it is just alot of
noise in general.
This commit is contained in:
Alan Guo Xiang Tan 2024-12-26 09:54:09 +08:00 committed by GitHub
parent e4cab1c60b
commit 061d6fd7a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,12 +11,8 @@ module Jobs
return if !Discourse.store.external? return if !Discourse.store.external?
return if !args.key?(:upload_ids) return if !args.key?(:upload_ids)
# NOTE: These log messages are set to warn to ensure this is working
# as intended in initial production trials, this will need to be set to debug
# after an acl_stale column is added to uploads.
time = time =
Benchmark.measure do Benchmark.measure do
Rails.logger.warn("Syncing ACL for upload ids: #{args[:upload_ids].join(", ")}")
Upload Upload
.includes(:optimized_images) .includes(:optimized_images)
.where(id: args[:upload_ids]) .where(id: args[:upload_ids])
@ -36,9 +32,6 @@ module Jobs
end end
end end
end end
Rails.logger.warn(
"Completed syncing ACL for upload ids in #{time}. IDs: #{args[:upload_ids].join(", ")}",
)
end end
end end
end end