Gem stalker on production
-
02-06-2021 - |
Question
I'm using Stalker to interact with beanstalkd on a production server. My jobs file looks like this:
gem 'stalker'
# config/jobs.rb with Rails
RAILS_ENV = ENV["RAILS_ENV"] || "development"
require File.expand_path("../environment", __FILE__)
job "mapeamento_paciente.importar" do |args|
mapeamento = Mapeamento::Paciente.find(args['id'])
importador = ImportadorPaciente.new(mapeamento)
importador.importar!
end
I'm trying to start stalker by issuing the command:
bundle exec stalk config/jobs.rb RAILS_ENV=production
But on loading the environment file, Rails tries to access the development database, instead of production, issuing an error. Does anybody knows how to solve this issue!?
Thanks!
Solution
RAILS_ENV=production bundle exec stalk config/jobs.rb
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow