ruby on rails - delayed_job tasks failing in daemon mode in production environment -
i'm trying use delayed_jobs. works perfectly, locally, when using rake jobs:work task. however, when try use daemon, tasks fail. i've stopped deleting failed tasks. i'm starting daemon 'rails_env=production bin/delayed_jobs start'. when status shows worker active.
they seem failing error 'job failed load: undefined class/module productaquisition.'
this snippet module i'm trying use (lib/product_aquisition.rb).
module productaquisition require 'net/http' def productaquisition.get_updates ..... end end
this rakefile i'm trying use trigger this
require 'debugger' require 'date' require 'thread' # require 'active_support' require "#{rails.root}/lib/product_aquisition.rb" require "#{rails.root}/app/helpers/soap_helper" include soaphelper include productaquisition task :get_updates => :environment productaquisition.delay.get_updates end
i don't understand how it's unable load , use module 'productaquisition' when running daemon. can shed light on this?
edit: full error message
full error output can seen here: https://gist.github.com/smithmr8/70f1f736fe1c679ceff1/raw/9586759c868adce3797ad9e7697789ef417821a6/gistfile1.rb
i tried posting here wouldn't wrap correctly.
Comments
Post a Comment