diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-11 13:35:57 +0200 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-27 15:43:37 +0200 |
commit | 71d884ad2d6eb4a877d2bfe163baeae0b7ddbac6 (patch) | |
tree | d497c20e6e6cb2af7a84d680690405aed9c48d05 /app/workers | |
parent | e63b693f28bf752f617bd0aa2f375db701d1600a (diff) | |
download | gitlab-ce-71d884ad2d6eb4a877d2bfe163baeae0b7ddbac6.tar.gz |
don't use assignment in if condition
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/invalid_gpg_signature_update_worker.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/workers/invalid_gpg_signature_update_worker.rb b/app/workers/invalid_gpg_signature_update_worker.rb index 277dd604aa8..c0bec3c9689 100644 --- a/app/workers/invalid_gpg_signature_update_worker.rb +++ b/app/workers/invalid_gpg_signature_update_worker.rb @@ -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 |