Sha256: 6d67dc65a3cd4b1b3a43d07eb86fc51e86c5a25d26ba49d38a4cdb297bd86188

Contents?: true

Size: 401 Bytes

Versions: 5

Compression:

Stored size: 401 Bytes

Contents

require 'clockwork'
require 'active_support/time'

module Clockwork
  LOGFILE = File.expand_path('../../tmp/signal_test.log', __FILE__)

  handler do |job|
    File.write(LOGFILE, 'start')
    sleep 0.1
    File.write(LOGFILE, 'done')
  end

  configure do |config|
    config[:sleep_timeout] = 0
    config[:logger] = Logger.new(StringIO.new)
  end

  every(1.seconds, 'run.me.every.1.seconds')
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
clockwork-3.0.2 test/samples/signal_test.rb
clockwork-3.0.1 test/samples/signal_test.rb
clockwork-3.0.0 test/samples/signal_test.rb
clockwork-2.0.4 test/samples/signal_test.rb
clockwork-2.0.3 test/samples/signal_test.rb