Skip to content

Commit

Permalink
RuboCop compliance
Browse files Browse the repository at this point in the history
* Please the linter

Change-Id: Iff1fca422e80b7d4a9c451ebcd92b0299d8cae7e
  • Loading branch information
achamo committed Apr 21, 2023
1 parent 26c1d63 commit 90fcf9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libraries/choregraphie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def self.ensure_whyrun_supported(run_context, resource_name, ignore_missing_reso
begin
resource = run_context.resource_collection.find(resource_name)
rescue Chef::Exceptions::ResourceNotFound
if ignore_missing_resource # rubocop:disable Style/GuardClause
if ignore_missing_resource
# some resources are defined only when used
# so we ignore them
return
Expand Down
4 changes: 2 additions & 2 deletions libraries/primitive_consul_maintenance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def maintenance?
# we observed in very rare cases that maintenance status could be not up to date
# for ~5s after a restart
results = 3.times.map do
checks = Diplomat::Agent.checks()
checks = Diplomat::Agent.checks
maint_status = checks.dig(@maintenance_key, 'Status')
sleep(@options[:check_interval])
maint_status == 'critical' && !checks.dig(@maintenance_key, 'Notes').nil?
Expand All @@ -40,7 +40,7 @@ def maintenance?

# @return [String, nil] reason of the maintenance, if any. Nil otherwise
def maintenance_reason
checks = Diplomat::Agent.checks()
checks = Diplomat::Agent.checks
checks.dig(@maintenance_key, 'Notes')
end

Expand Down

0 comments on commit 90fcf9a

Please sign in to comment.