search for: jobscommon

Displaying 1 result from an estimated 1 matches for "jobscommon".

2010 Aug 09
0
Logging form delayed job class
...nitializer Delayed::Worker.backend = :active_record Delayed::Worker.logger = Rails.logger #Delayed::Worker.logger = ActiveSupport::BufferedLogger.new("log/ ##{Rails.env}_delayed_jobs.log", Rails.logger.level) class Delayed::Job def logger Delayed::Worker.logger end end if JobsCommon::check_job_exists("PeriodicJob").blank? Delayed::Job.enqueue PeriodicJob.new(), 0, Constants::PROCESS_FREQ.from_now end #end This is my job class class PeriodicJob def perform this.logger.info "Periodic job writing #{Time.now}" # Rails.logger.info "...