I am using Clock worker gem for back ground process
I have a Configuration table which contains key and value.
My clock.rb file
require 'clockwork' require './config/boot' require './config/environment' module Clockwork handler do |job| puts "Running #{job}" end time = Configuration.find_by(:key=>"time") if time.present? min = time.value.to_i every(min.minutes, 'calculate user details') { User.calculate_time} end end
When run the worker: config/clock.rb
This will work fine but when i am changing time from Configuration, How worker will work without restart the clock worker file ??
I can think of: