lib/rest-ftp-daemon/workers/conchita.rb in rest-ftp-daemon-0.302.3 vs lib/rest-ftp-daemon/workers/conchita.rb in rest-ftp-daemon-0.304.0

- old
+ new

@@ -1,10 +1,10 @@ +# Worker used to clean up the queue deleting expired jobs + module RestFtpDaemon + class ConchitaWorker < Worker - # Worker used to clean up the queue deleting expired jobs - class ConchitaWorker < Shared::WorkerBase - protected def worker_init # Load corker conf config_section :conchita @@ -29,19 +29,20 @@ $queue.expire JOB_STATUS_FAILED, maxage(JOB_STATUS_FAILED), @config[:debug] $queue.expire JOB_STATUS_QUEUED, maxage(JOB_STATUS_QUEUED), @config[:debug] # Force garbage collector GC.start if @config["garbage_collector"] - - rescue StandardError => e - log_error "EXCEPTION: #{e.inspect}" - sleep 1 end private def maxage status @config["clean_#{status}"] || 0 end + + # NewRelic instrumentation + add_transaction_tracer :worker_init, category: :task + add_transaction_tracer :worker_after, category: :task + add_transaction_tracer :worker_process, category: :task end end