Class: Sidekiq::HeartbeatMonitor::TestWorker

Inherits:
Object
  • Object
show all
Includes:
Worker
Defined in:
lib/sidekiq/heartbeat_monitor/test_worker.rb

Overview

Used for testing purposes to ensure that the system is working properly.

Instance Method Summary collapse

Instance Method Details

#perform(wait_time = 1.second) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/sidekiq/heartbeat_monitor/test_worker.rb', line 11

def perform(wait_time = 1.second)
  puts "Internal test worker started and will continue for the next #{wait_time} seconds." if wait_time > 3.seconds

  sleep(wait_time)

  puts "Internal test worker finished after #{wait_time} seconds." if wait_time > 3.seconds
end