Class: Resque::Failure::Redis
- Inherits:
-
Object
- Object
- Resque::Failure::Redis
- Defined in:
- lib/bizside/resque.rb
Instance Method Summary collapse
Instance Method Details
#save ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/bizside/resque.rb', line 72 def save data = { :failed_at => UTF8Util.clean(Time.now.strftime("%Y/%m/%d %H:%M:%S %Z")), :payload => payload, :exception => exception.class.to_s, :error => exception.to_s, #UTF8Util.clean(exception.to_s), UTF8Util.cleanを呼ぶと文字化けする :backtrace => filter_backtrace(Array(exception.backtrace)), :worker => worker.to_s, :queue => queue } data = Resque.encode(data) Resque.redis.rpush(:failed, data) end |