你好我是rails的新手我想在我的rails应用程序中创建一个worker,使用resque作为后台作业。 工作者必须运行位于我的主目录中的python脚本。
class DataCollector
@queue = :data_collection_queue
def self.perform(*args)
redis = Redis.new(:host => Figaro.env.redis_host, :port => Figaro.env.redis_port, :password => Figaro.env.redis_password)
system("exec '/usr/home/hello.py'")
end
end
任何建议?