Skip to content

Commit

Permalink
rubocop and gem updates
Browse files Browse the repository at this point in the history
  • Loading branch information
terrywbrady committed Aug 9, 2024
1 parent 7a35a60 commit b354f18
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/main/ruby/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ GEM
diff-lcs (1.5.1)
json (2.7.2)
language_server-protocol (3.17.0.3)
parallel (1.25.1)
parser (3.3.4.0)
parallel (1.26.1)
parser (3.3.4.2)
ast (~> 2.4.1)
racc
psych (5.1.2)
Expand All @@ -17,7 +17,7 @@ GEM
rdoc (6.7.0)
psych (>= 4.0.0)
regexp_parser (2.9.2)
rexml (3.3.2)
rexml (3.3.4)
strscan
rspec (3.13.0)
rspec-core (~> 3.13.0)
Expand All @@ -32,7 +32,7 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubocop (1.65.0)
rubocop (1.65.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -43,7 +43,7 @@ GEM
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
rubocop-ast (1.32.0)
parser (>= 3.3.1.0)
ruby-progressbar (1.13.0)
stringio (3.1.1)
Expand Down
6 changes: 5 additions & 1 deletion src/main/ruby/lib/merritt_zk_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,13 @@ def status_object(oldstat, status)
jobj[:last_successful_status] = nil unless jobj.key?(:last_successful_status)

if oldstatus.nil?
# no action 1
elsif status.nil?
elsif status == MerrittZK::JobState::Failed || status == MerrittZK::JobState::Deleted
# no action 2
elsif [MerrittZK::JobState::Failed, MerrittZK::JobState::Deleted].include?(status)
# no action 3
elsif status.name == oldstatus
# no action 4
else
jobj[:last_successful_status] = oldstatus
end
Expand Down
2 changes: 1 addition & 1 deletion src/main/ruby/lib/merritt_zk_queue_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def set_status(zk, status, message = '')

oldjson = nil
oldjson = json_property(zk, ZkKeys::STATUS) if zk.exists?("#{path}/#{ZkKeys::STATUS}")

json = status_object(oldjson, status)
json[:message] = message
data = QueueItem.serialize(json)
Expand Down

0 comments on commit b354f18

Please sign in to comment.