lib/rhoconnect/read_state.rb in rhoconnect-3.0.2 vs lib/rhoconnect/read_state.rb in rhoconnect-3.0.3

- old
+ new

@@ -1,15 +1,17 @@ module Rhoconnect class ReadState < Model field :refresh_time, :integer + field :prev_refresh_time, :integer field :retry_counter, :integer def self.create(fields) fields[:id] = get_id(fields) fields.delete(:app_id) fields.delete(:user_id) fields.delete(:source_name) fields[:refresh_time] ||= Time.now.to_i + fields[:prev_refresh_time] ||= Time.now.to_i fields[:retry_counter] ||= 0 super(fields,{}) end def self.load(params) \ No newline at end of file