Skip to content

Commit a5c24f0

Browse files
committed
rubocop
1 parent b13305e commit a5c24f0

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

src-colladmin/actions/queue_action.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ def initialize(config, action, path, myparams, endpoint)
1111
endpoint = endpoint.gsub(/coll$/, coll) unless coll.empty?
1212
super(config, action, path, myparams, endpoint)
1313
end
14-
end
14+
end

src-colladmin/actions/zookeeper_action.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def perform_action
310310
count = 0
311311
ql = QueueList.new(@zk, { held: true })
312312
ql.jobs.each do |j|
313-
job = MerrittZK::Job.new(j.queueId)
313+
job = MerrittZK::Job.new(j.queue_id)
314314
job.load(@zk)
315315
job.set_status(@zk, MerrittZK::JobState::Pending)
316316
count += 1
@@ -332,7 +332,8 @@ def perform_action
332332
job = QueueEntry.new(j)
333333
next unless job.qstatus == 'Held'
334334
next unless job.profile == @coll
335-
set_legacy_status("/ingest/#{job.queueId}", 'Pending')
335+
336+
set_legacy_status("/ingest/#{job.queue_id}", 'Pending')
336337
count += 1
337338
end
338339
{ message: "queue release submitted for #{count}" }.to_json
@@ -394,4 +395,4 @@ def perform_action
394395
redirect_location: "/web/collIndex.html?path=#{@reload_path}"
395396
}.to_json
396397
end
397-
end
398+
end

src-colladmin/lib/queue.rb

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def to_table_row
155155
arr
156156
end
157157

158-
def queueId
158+
def queue_id
159159
get_value(:queueId)
160160
end
161161

@@ -237,15 +237,10 @@ def initialize(zk, filter = {})
237237
end
238238
jobs.each do |j|
239239
job = QueueEntry.new(j)
240-
if @filter.key?(:batch)
241-
next unless job.bid == @filter[:batch]
242-
end
243-
if @filter.fetch(:deletable, false)
244-
next unless %w[Completed Deleted].include?(job.qstatus)
245-
end
246-
if @filter.fetch(:held, false)
247-
next unless %w[Held].include?(job.qstatus)
248-
end
240+
next if @filter.key?(:batch) && job.bid != @filter[:batch]
241+
next if @filter.fetch(:deletable, false) && !%w[Completed Deleted].include?(job.qstatus)
242+
next if @filter.fetch(:held, false) && !%w[Held].include?(job.qstatus)
243+
249244
@jobs << job
250245
qb = @batches.fetch(job.bid, QueueBatch.new(job.bid, job.user))
251246
qb.add_job(job)

0 commit comments

Comments
 (0)