before_enqueueメソッドのresqueenqueueメソッドの*argsパラメーターにいくつかの引数を追加し、追加した引数をbefore_performメソッドに渡す方法はありますか?
または、before_enqueueメソッドからbefore_performメソッドに個別にデータを送信する方法はありますか?
例えば:
class Action
:queue queueName
def self.before_enqueue(*args)
param1 = 1
param2 = 2
args.push(param1, param2)
# I know this is not the correct way as args is a local variable here.
#But something like this
end
def self.before_perform(*args)
puts args.inspect # I need the added args here
end
def self.perform(params)
#some code here
end
end