Sha256: b45f3d10c15302adecd2c8fd55e942e6afb4d6583c8bc6f7c8880c5b6f903c7b
Contents?: true
Size: 686 Bytes
Versions: 1
Compression:
Stored size: 686 Bytes
Contents
require './config/environment.rb' class SeapigRouterSessionStateProducer < Producer @patterns = [ 'web-session-state-*' ] def self.produce(object_id) object_id =~ /web-session-state-([^-]+)\:(\d+)/ session_key = $1 state_id = $2.to_i version = Time.new.to_f session = SeapigRouterSession.find_by(key: session_key) return [false, SeapigDependency.versions('SeapigRouterSessionState#'+(session_key or ""))] if not session state = SeapigRouterSessionState.find_by(seapig_router_session_id: session.id, state_id: state_id) return [false, SeapigDependency.versions('SeapigRouterSessionState#'+session_key)] if not state data = state.state [data, version] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
seapig-rails-0.1.4 | lib/seapigs/seapig_router_session_state.rb |