Open youatbanjo opened 11 years ago
I ended up define variables in a file jobs/variable.rb and add require_relative('variable.rb') to all jobs. It works for now. But still, are there any better ways other than this?
Hi,
I'm trying to do the same thing. I try your method without success... Can you give me more information about your 'variable.rb' file? Did you let the SHEDULER on like the other jobs?
Did you find another method?
I want to store paths in globals variables.
Thx
My way was kinda hacky since the variable.rb file is not actually a job. It doesn't call the scheduler. All is does is declaring the global vars.
Let me know if this works or you find other methods around this.
Hi,
I was trying to define a constant global url string that several jobs can poll data from. Is there anywhere that I can define such variables? I've read in some posts that all erb files have access to variables defined in Sinatra::Application, but that seems not to be the case for the rb job files. Any suggestions?