resque-meta and multiple arguments in ruby
I recently switched to using Resque-meta and now I'm a bit confused with how best to handle multiple arguments. I was passing it as the first ID, but using the meta plugin, the meta id becomes the ID, and it breaks.
c=MessifyAsync.enqueue(5094, Date.today)
Now it shows the first ID as meta stamp
["0cb5843267d5eaef77eaf770ece86bb2850f46bc", 5094, "2011-07-29"]
Code:
require 'resque/plugins/resque_herok开发者_StackOverflow中文版u_autoscaler'
require 'resque-meta'
class MessifyAsync
extend Resque::Plugins::HerokuAutoscaler
extend Resque::Plugins::Meta
@queue = :messify
def self.perform(space_id, date = Date.today+7.days)
Available.messify(:id => space_id, :date => date)
end
end
精彩评论