BigW Consortium Gitlab

Commit 71d884ad by Alexis Reigel

don't use assignment in if condition

parent e63b693f
......@@ -3,10 +3,12 @@ class InvalidGpgSignatureUpdateWorker
include DedicatedSidekiqQueue
def perform(gpg_key_id)
if gpg_key = GpgKey.find_by(id: gpg_key_id)
Gitlab::Gpg::InvalidGpgSignatureUpdater.new(gpg_key).run
else
Rails.logger.error("InvalidGpgSignatureUpdateWorker: couldn't find gpg_key with ID=#{gpg_key_id}, skipping job")
gpg_key = GpgKey.find_by(id: gpg_key_id)
unless gpg_key
return Rails.logger.error("InvalidGpgSignatureUpdateWorker: couldn't find gpg_key with ID=#{gpg_key_id}, skipping job")
end
Gitlab::Gpg::InvalidGpgSignatureUpdater.new(gpg_key).run
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment