Skip to content

Commit ceaa283

Browse files
committed
Rubocop update: Remove redundant "begin"/"end"
1 parent f55b896 commit ceaa283

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

scripts/generate_jobs.rb

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
# usage: pipe this script into bin/console on a cc-worker vm
22

3-
begin
4-
NUM_JOBS = 1
5-
DELAY = 1
3+
NUM_JOBS = 1
4+
DELAY = 1
65

7-
puts "Generating #{NUM_JOBS} dummy job(s) with delay of #{DELAY} seconds"
8-
enqueuer = VCAP::CloudController::Jobs::Enqueuer.new(queue: VCAP::CloudController::Jobs::Queues.generic)
9-
start_time = Time.now
10-
NUM_JOBS.times do
11-
dummy_job = VCAP::CloudController::Jobs::Runtime::BlobstoreDelete.new('00000000-0000-0000-0000-000000000000/0000000000000000000000000000000000000000', :droplet_blobstore)
12-
enqueuer.enqueue(dummy_job)
13-
sleep DELAY
14-
end
15-
puts "Generated #{NUM_JOBS} dummy job(s) in #{Time.now - start_time} seconds"
6+
puts "Generating #{NUM_JOBS} dummy job(s) with delay of #{DELAY} seconds"
7+
enqueuer = VCAP::CloudController::Jobs::Enqueuer.new(queue: VCAP::CloudController::Jobs::Queues.generic)
8+
start_time = Time.now
9+
NUM_JOBS.times do
10+
dummy_job = VCAP::CloudController::Jobs::Runtime::BlobstoreDelete.new('00000000-0000-0000-0000-000000000000/0000000000000000000000000000000000000000', :droplet_blobstore)
11+
enqueuer.enqueue(dummy_job)
12+
sleep DELAY
1613
end
14+
puts "Generated #{NUM_JOBS} dummy job(s) in #{Time.now - start_time} seconds"

0 commit comments

Comments
 (0)