lib/progressrus/store/redis.rb in progressrus-0.1.1 vs lib/progressrus/store/redis.rb in progressrus-0.1.2
- old
+ new
@@ -61,10 +61,10 @@
def key(scope)
"#{prefix}:#{scope.join(":")}"
end
def deserialize(value)
- JSON.parse(value, symbolize_names: true)
+ JSON.parse(value, symbolize_names: true).merge(persisted: true)
end
def outdated?(progress, now: Time.now)
(now - interval).to_i >= persisted_at(progress).to_i
end