Commit 71d884ad authored by Alexis Reigel's avatar Alexis Reigel

don't use assignment in if condition

parent e63b693f
...@@ -3,10 +3,12 @@ class InvalidGpgSignatureUpdateWorker ...@@ -3,10 +3,12 @@ class InvalidGpgSignatureUpdateWorker
include DedicatedSidekiqQueue include DedicatedSidekiqQueue
def perform(gpg_key_id) def perform(gpg_key_id)
if gpg_key = GpgKey.find_by(id: gpg_key_id) gpg_key = GpgKey.find_by(id: gpg_key_id)
Gitlab::Gpg::InvalidGpgSignatureUpdater.new(gpg_key).run
else unless gpg_key
Rails.logger.error("InvalidGpgSignatureUpdateWorker: couldn't find gpg_key with ID=#{gpg_key_id}, skipping job") return Rails.logger.error("InvalidGpgSignatureUpdateWorker: couldn't find gpg_key with ID=#{gpg_key_id}, skipping job")
end end
Gitlab::Gpg::InvalidGpgSignatureUpdater.new(gpg_key).run
end end
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