Create article for Worker on environment variables
Closed this issue · 0 comments
frommww commented
Create best practices article for worker that addresses how to set ENV variables in a worker.
question: im wondering, is it possible to set ENV variables of a worker?... I'm getting a yaml read error in ruby trying to read a UTF-8 doc
answer:
no native way, but you still can do it quote easily.
ENV['aaa'] = 'bbbb'
in a beginning of a task
and you're done
if you want to pass env variables - you can pass them via payload
params[:env].each{|k,v| ENV[k] = v }