{: rooto:"YARD::CodeObjects::RootObject:@childrenIC:&YARD::CodeObjects::CodeObjectList[o:$YARD::CodeObjects::ModuleObject;IC;["o:$YARD::CodeObjects::MethodObject:@module_functionF: @scope: instance:@visibility: public: @pathI"Isimud#client_type:EF:@parameters[: @files[[I"lib/isimud.rb;Ti-:@current_file_has_commentsT: @name:client_type:@source_type: ruby: @tags[:@docstrings{:@docstringIC:YARD::Docstring" ;T:@ref_tags[;[o:YARD::Tags::Tag :@tag_nameI" return;F: @textI"Type of client to use;T;0: @types[I" Enumerable<'bunny', 'test'>;T: @object@ : @allI"@@return [Enumerable<'bunny', 'test'>] Type of client to use;T:@unresolved_reference0;"@ :@namespace@:@signatureI"def client_type;T: @sourceI"1config_accessor :client_type do :bunny end;To; ; F; ; ;;;I"Isimud#client_options;F;[;[[@i-;T;:client_options;;;[;{;IC;" ;T;[;[o; ;I" return;F; I"client specific options;T;0;![I" Hash;T;"@;#I"+@return [Hash] client specific options;T;$0;"@;%@;&I"def client_options;T;'I"1config_accessor :client_type do :bunny end;To; ; F; ; ;;;I"Isimud#default_client;F;[;[[@i-;T;:default_client;;;[;{;IC;" ;T;[;[o; ;I" return;F; I"default client;T;0;![I"Isimud::Client;T;"@/;#I",@return [Isimud::Client] default client;T;$0;"@/;%@;&I"def default_client;T;'I"1config_accessor :client_type do :bunny end;To; ; F; ; ;;;I"Isimud#events_exchange;F;[;[[@i-;T;:events_exchange;;;[;{;IC;" ;T;[;[o; ;I" return;F; I"6AMQP exchange used for publishing Event instances;T;0;![I" String;T;"@A;#I"G@return [String] AMQP exchange used for publishing Event instances;T;$0;"@A;%@;&I"def events_exchange;T;'I"1config_accessor :client_type do :bunny end;To; ; F; ; ;;;I" Isimud#enable_model_watcher;F;[;[[@i-;T;:enable_model_watcher;;;[;{;IC;" ;T;[;[o; ;I" return;F; I"1when set, send Isimud::ModelWatcher messages;T;0;![I" Boolean;T;"@S;#I"C@return [Boolean] when set, send Isimud::ModelWatcher messages;T;$0;"@S;%@;&I"def enable_model_watcher;T;'I"1config_accessor :client_type do :bunny end;To; ; F; ; ;;;I" Isimud#listener_error_limit;F;[;[[@i-;T;:listener_error_limit;;;[;{;IC;" ;T;[;[o; ;I" return;F; I"Smaximum number of exceptions allowed per hour before listener shuts down (100);T;0;![I" Integer;T;"@e;#I"e@return [Integer] maximum number of exceptions allowed per hour before listener shuts down (100);T;$0;"@e;%@;&I"def listener_error_limit;T;'I"1config_accessor :client_type do :bunny end;To; ; F; ; ;;;I"Isimud#logger;F;[;[[@i-;T;: logger;;;[;{;IC;" ;T;[;[o; ;I" return;F; I"/logger for tracing messages (Rails.logger);T;0;![I" Logger;T;"@w;#I"@@return [Logger] logger for tracing messages (Rails.logger);T;$0;"@w;%@;&I"def logger;T;'I"1config_accessor :client_type do :bunny end;To; ; F; ; ;;;I"Isimud#log_level;F;[;[[@i-;T;:log_level;;;[;{;IC;" ;T;[;[o; ;I" return;F; I"log level (:debug);T;0;![I" Symbol;T;"@;#I"(@return [Symbol] log level (:debug);T;$0;"@;%@;&I"def log_level;T;'I"1config_accessor :client_type do :bunny end;To; ; F; ; ;;;I""Isimud#model_watcher_exchange;F;[;[[@i-;T;:model_watcher_exchange;;;[;{;IC;" ;T;[;[o; ;I" return;F; I";T;"@;#I":@return [] server connection attributes;T;$0;"@;%@;&I"def server;T;'I"1config_accessor :client_type do :bunny end;To; ; F; : class;;;I"Isimud.client_class;F;[;[[@iG;F;:client_class;;;[;{;IC;" ;T;"@: @summary0:@hash_flagF;[;[;#I";T;$0;%@;&I"def self.client_class;T;'I"hdef self.client_class type = "#{client_type}_client".classify "Isimud::#{type}".constantize end;T:@explicitT: @dynamicTo; ; F; ;4;;;I"Isimud.client;F;[;[[@iN;T;: client;;;[;{;IC;"?Fetch or initialize the messaging client for this process. ;T;[;[o; ;I" return;F; I"messaging client;T;0;![I"Isimud::Client;T;"@;#I"iFetch or initialize the messaging client for this process. @return [Isimud::Client] messaging client;T;$0;"@;7F:@line_rangeo: Range: exclF: beginiL:endiM;%@;&I"def self.client;T;'I"adef self.client self.default_client ||= client_class.new(server, client_options || {}) end;T;8T;9To; ; F; ;4;;;I"Isimud.connect;F;[;[[@iS;T;: connect;;;[;{;IC;"$Connect to the messaging server ;T;[;[;#I"$Connect to the messaging server;T;$0;"@;7F;;o;<;=F;>iR;?iR;%@;&I"def self.connect;T;'I"*def self.connect client.connect end;T;8T;9To; ; F; ;4;;;I""Isimud.model_watcher_enabled?;F;[;[[@iX;T;:model_watcher_enabled?;;;[;{;IC;")Return status of model watching mode ;T;[;[o; ;I" return;F; I";T;0;![I" Boolean;T;"@;#I")Return status of model watching mode;T;$0;"@;7F;;o;<;=F;>iW;?iW;%@;&I"$def self.model_watcher_enabled?;T;'I"\def self.model_watcher_enabled? enable_model_watcher.nil? || enable_model_watcher end;T;8T;9To; ; F; ;4;;;I"Isimud.reconnect;F;[;[[@i];T;:reconnect;;;[;{;IC;"#Reconnect the messaging client ;T;[;[;#I"#Reconnect the messaging client;T;$0;"@1;7F;;o;<;=F;>i\;?i\;%@;&I"def self.reconnect;T;'I".def self.reconnect client.reconnect end;T;8T;9To:#YARD::CodeObjects::ClassObject;IC;[o; ; F; ; ;;;I"Isimud::Event#type;F;[;[[I"lib/isimud/event.rb;Ti ;F;: type;;;[;{;IC;"(Returns the value of attribute type ;T;"@A;60;7F;[;[;#I"(Returns the value of attribute type;T;$0;%@?;&I" def type;T;'I"def type @type end;T;9To; ; F; ; ;;;I"Isimud::Event#type=;F;[[I" value;T0;[[@Fi ;F;: type=;;;[;{;IC;"Sets the attribute type ;T;"@O;60;7F;[;[o; ;I" param;F; I",the value to set the attribute type to.;T;I" value;T;!0;"@O;#I"QSets the attribute type @param value the value to set the attribute type to.;T;$0;%@?;&I"def type=(value);T;'I")def type=(value) @type = value end;T;9To; ; F; ; ;;;I"Isimud::Event#action;F;[;[[@Fi ;F;: action;;;[;{;IC;"*Returns the value of attribute action ;T;"@b;60;7F;[;[;#I"*Returns the value of attribute action;T;$0;%@?;&I"def action;T;'I"def action @action end;T;9To; ; F; ; ;;;I"Isimud::Event#action=;F;[[I" value;T0;[[@Fi ;F;: action=;;;[;{;IC;"Sets the attribute action ;T;"@o;60;7F;[;[o; ;I" param;F; I".the value to set the attribute action to.;T;I" value;T;!0;"@o;#I"USets the attribute action @param value the value to set the attribute action to.;T;$0;%@?;&I"def action=(value);T;'I"-def action=(value) @action = value end;T;9To; ; F; ; ;;;I"Isimud::Event#user_id;F;[;[[@Fi ;F;: user_id;;;[;{;IC;"+Returns the value of attribute user_id ;T;"@;60;7F;[;[;#I"+Returns the value of attribute user_id;T;$0;%@?;&I"def user_id;T;'I"def user_id @user_id end;T;9To; ; F; ; ;;;I"Isimud::Event#user_id=;F;[[I" value;T0;[[@Fi ;F;: user_id=;;;[;{;IC;"Sets the attribute user_id ;T;"@;60;7F;[;[o; ;I" param;F; I"/the value to set the attribute user_id to.;T;I" value;T;!0;"@;#I"WSets the attribute user_id @param value the value to set the attribute user_id to.;T;$0;%@?;&I"def user_id=(value);T;'I"/def user_id=(value) @user_id = value end;T;9To; ; F; ; ;;;I"Isimud::Event#occurred_at;F;[;[[@Fi ;F;:occurred_at;;;[;{;IC;"/Returns the value of attribute occurred_at ;T;"@;60;7F;[;[;#I"/Returns the value of attribute occurred_at;T;$0;%@?;&I"def occurred_at;T;'I"'def occurred_at @occurred_at end;T;9To; ; F; ; ;;;I"Isimud::Event#occurred_at=;F;[[I" value;T0;[[@Fi ;F;:occurred_at=;;;[;{;IC;"#Sets the attribute occurred_at ;T;"@;60;7F;[;[o; ;I" param;F; I"3the value to set the attribute occurred_at to.;T;I" value;T;!0;"@;#I"_Sets the attribute occurred_at @param value the value to set the attribute occurred_at to.;T;$0;%@?;&I"def occurred_at=(value);T;'I"7def occurred_at=(value) @occurred_at = value end;T;9To; ; F; ; ;;;I" Isimud::Event#eventful_type;F;[;[[@Fi ;F;:eventful_type;;;[;{;IC;"1Returns the value of attribute eventful_type ;T;"@;60;7F;[;[;#I"1Returns the value of attribute eventful_type;T;$0;%@?;&I"def eventful_type;T;'I"+def eventful_type @eventful_type end;T;9To; ; F; ; ;;;I"!Isimud::Event#eventful_type=;F;[[I" value;T0;[[@Fi ;F;:eventful_type=;;;[;{;IC;"%Sets the attribute eventful_type ;T;"@;60;7F;[;[o; ;I" param;F; I"5the value to set the attribute eventful_type to.;T;I" value;T;!0;"@;#I"cSets the attribute eventful_type @param value the value to set the attribute eventful_type to.;T;$0;%@?;&I"def eventful_type=(value);T;'I";def eventful_type=(value) @eventful_type = value end;T;9To; ; F; ; ;;;I"Isimud::Event#eventful_id;F;[;[[@Fi ;F;:eventful_id;;;[;{;IC;"/Returns the value of attribute eventful_id ;T;"@;60;7F;[;[;#I"/Returns the value of attribute eventful_id;T;$0;%@?;&I"def eventful_id;T;'I"'def eventful_id @eventful_id end;T;9To; ; F; ; ;;;I"Isimud::Event#eventful_id=;F;[[I" value;T0;[[@Fi ;F;:eventful_id=;;;[;{;IC;"#Sets the attribute eventful_id ;T;"@;60;7F;[;[o; ;I" param;F; I"3the value to set the attribute eventful_id to.;T;I" value;T;!0;"@;#I"_Sets the attribute eventful_id @param value the value to set the attribute eventful_id to.;T;$0;%@?;&I"def eventful_id=(value);T;'I"7def eventful_id=(value) @eventful_id = value end;T;9To; ; F; ; ;;;I"Isimud::Event#parameters;F;[;[[@Fi ;F;:parameters;;;[;{;IC;".Returns the value of attribute parameters ;T;"@;60;7F;[;[;#I".Returns the value of attribute parameters;T;$0;%@?;&I"def parameters;T;'I"%def parameters @parameters end;T;9To; ; F; ; ;;;I"Isimud::Event#parameters=;F;[[I" value;T0;[[@Fi ;F;:parameters=;;;[;{;IC;""Sets the attribute parameters ;T;"@;60;7F;[;[o; ;I" param;F; I"2the value to set the attribute parameters to.;T;I" value;T;!0;"@;#I"]Sets the attribute parameters @param value the value to set the attribute parameters to.;T;$0;%@?;&I"def parameters=(value);T;'I"5def parameters=(value) @parameters = value end;T;9To; ; F; ; ;;;I"Isimud::Event#exchange=;F;[[I" value;T0;[[@Fi ;F;:exchange=;;;[;{;IC;" Sets the attribute exchange ;T;"@";60;7F;[;[o; ;I" param;F; I"0the value to set the attribute exchange to.;T;I" value;T;!0;"@";#I"YSets the attribute exchange @param value the value to set the attribute exchange to.;T;$0;%@?;&I"def exchange=(value);T;'I"1def exchange=(value) @exchange = value end;T;9To:&YARD::CodeObjects::ConstantObject;[[@Fi;F;:DEFAULT_TYPE;;;;;[;{;IC;" ;T;"@5;60;7F;[;[;#I";T;$0;%@?;I" Isimud::Event::DEFAULT_TYPE;F;&I"DEFAULT_TYPE = :model;T;'I"DEFAULT_TYPE = :model;T: @valueI" :model;T;9To; ; F; ; ;;;I"Isimud::Event#initialize;F;[[I" *args;T0;[[@Fi ;T;:initialize;;;[;{;IC;"Initialize a new Event ;T;[;[o:YARD::Tags::OverloadTag ;I" overload;F; 0;:Event.new;!0;&I"*Event.new(user, eventful, parameters);T;IC;"@param[#id] user user associated by the event @param[ActiveRecord::Base] eventful object associated with event @param[Hash] parameters optional additional parameters ;T;"@B;60;7F;[;[;#I"@param[#id] user user associated by the event @param[ActiveRecord::Base] eventful object associated with event @param[Hash] parameters optional additional parameters;T;$0;[[I" user;T0[I" eventful;T0[I"parameters;T0;"@Bo;W ;I" overload;F; 0;;X;!0;&I"Event.new(attributes);T;IC;"-@param[Hash] attributes event attributes ;T;"@B;60;7F;[;[o:YARD::Tags::OptionTag ;I" option;F; 0;I"attributes;T;!0: @pairo:YARD::Tags::DefaultTag ;I" option;F; I"%ID of User associated with event;T;I" :user_id;T;![I" Integer;T:@defaults0;"@Bo;Y ;I" option;F; 0;I"attributes;T;!0;Zo;[ ;I" option;F; I"*class of object associated with event;T;I":eventful_type;T;![I" String;T;\0;"@Bo;Y ;I" option;F; 0;I"attributes;T;!0;Zo;[ ;I" option;F; I"'id of object associated with event;T;I":eventful_id;T;![I" Integer;T;\0;"@Bo;Y ;I" option;F; 0;I"attributes;T;!0;Zo;[ ;I" option;F; I""exchange for publishing event;T;I":exchange;T;![I" String;T;\[I"Isimud.events_exchange;T;"@Bo;Y ;I" option;F; 0;I"attributes;T;!0;Zo;[ ;I" option;F; I"Mobject associated with event. This sets :eventful_type and :eventful_id.;T;I":eventful;T;![I"ActiveRecord::Base;T;\0;"@Bo;Y ;I" option;F; 0;I"attributes;T;!0;Zo;[ ;I" option;F; I"event type;T;I" :type;T;![I" String;TI" Symbol;T;\[I" :model;T;"@Bo;Y ;I" option;F; 0;I"attributes;T;!0;Zo;[ ;I" option;F; I"event action;T;I" :action;T;![I" String;T;\0;"@Bo;Y ;I" option;F; 0;I"attributes;T;!0;Zo;[ ;I" option;F; I"!date and time event occurred;T;I":occurred_at;T;![I" Time;T;\[I" Time.now;T;"@Bo;Y ;I" option;F; 0;I"attributes;T;!0;Zo;[ ;I" option;F; I"additional parameters;T;I":parameters;T;![I" Hash;T;\0;"@B;#I"@param[Hash] attributes event attributes @option attributes [Integer] :user_id ID of User associated with event @option attributes [String] :eventful_type class of object associated with event @option attributes [Integer] :eventful_id id of object associated with event @option attributes [String] :exchange (Isimud.events_exchange) exchange for publishing event @option attributes [ActiveRecord::Base] :eventful object associated with event. This sets :eventful_type and :eventful_id. @option attributes [String, Symbol] :type (:model) event type @option attributes [String] :action event action @option attributes [Time] :occurred_at (Time.now) date and time event occurred @option attributes [Hash] :parameters additional parameters;T;$0;[[I"attributes;T0;"@Bo; ;I" return;F; I"a new instance of Event;T;0;![I" Event;F;"@B;#I"Initialize a new Event @overload Event.new(user, eventful, parameters) @param[#id] user user associated by the event @param[ActiveRecord::Base] eventful object associated with event @param[Hash] parameters optional additional parameters @overload Event.new(attributes) @param[Hash] attributes event attributes @option attributes [Integer] :user_id ID of User associated with event @option attributes [String] :eventful_type class of object associated with event @option attributes [Integer] :eventful_id id of object associated with event @option attributes [String] :exchange (Isimud.events_exchange) exchange for publishing event @option attributes [ActiveRecord::Base] :eventful object associated with event. This sets :eventful_type and :eventful_id. @option attributes [String, Symbol] :type (:model) event type @option attributes [String] :action event action @option attributes [Time] :occurred_at (Time.now) date and time event occurred @option attributes [Hash] :parameters additional parameters;T;$0;"@B;7F;;o;<;=F;>i;?i;%@?;&I"def initialize(*args);T;'I"#def initialize(*args) options = args.extract_options!.with_indifferent_access self.type = options.delete(:type).try(:to_sym) || DEFAULT_TYPE self.exchange = options.delete(:exchange) self.action = options.delete(:action).try(:to_sym) self.user_id = options.delete(:user_id) self.occurred_at = if (occurred = options.delete(:occurred_at)) occurred.kind_of?(String) ? Time.parse(occurred) : occurred else Time.now.utc end eventful_object = options.delete(:eventful) if args.length > 0 self.parameters = options if (user = args.shift) self.user_id = user.id end eventful_object ||= args.shift end if eventful_object self.eventful_type = eventful_object.class.base_class.name self.eventful_id = eventful_object.id else self.eventful_type = options.delete(:eventful_type) self.eventful_id = options.delete(:eventful_id) end self.parameters = options.delete(:parameters) || options end;T;8T;9To; ; F; ; ;;;I"Isimud::Event#exchange;F;[;[[@FiB;F;: exchange;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@?;&I"def exchange;T;'I";def exchange @exchange || Isimud.events_exchange end;T;8T;9To; ; F; ; ;;;I"Isimud::Event#routing_key;F;[;[[@FiF;F;:routing_key;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@?;&I"def routing_key;T;'I"\def routing_key [type.to_s, eventful_type, eventful_id, action].compact.join('.') end;T;8T;9To; ; F; ; ;;;I"Isimud::Event#as_json;F;[[I" options;TI"{};T;[[@FiM;T;: as_json;;;[;{;IC;"1Return hash of data to be serialized to JSON ;T;[;[o;Y ;I" option;F; 0;I" options;T;!0;Zo;[ ;I" option;F; I"0when set, do not include parameters in data;T;I":omit_parameters;T;![I" Boolean;T;\0;"@o; ;I" return;F; I"data to serialize;T;0;![I" Hash;T;"@o; ;I" param;F; I""a customizable set of options;T;@;![I" Hash;T;"@;#I"Return hash of data to be serialized to JSON @option options [Boolean] :omit_parameters when set, do not include parameters in data @return [Hash] data to serialize;T;$0;"@;7F;;o;<;=F;>iJ;?iL;%@?;&I"def as_json(options = {});T;'I"def as_json(options = {}) session_id = parameters.delete(:session_id) || Thread.current[:keas_session_id] data = {type: type, action: action, user_id: user_id, occurred_at: occurred_at, eventful_type: eventful_type, eventful_id: eventful_id, session_id: session_id} data[:parameters] = parameters unless options[:omit_parameters] data end;T;8T;9To; ; F; ; ;;;I"Isimud::Event#serialize;F;[;[[@FiV;F;:serialize;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@?;&I"def serialize;T;'I"%def serialize self.to_json end;T;8T;9To; ; F; ;4;;;I"Isimud::Event.parse;F;[[I" data;T0;[[@Fi[;F;: parse;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@?;&I"def parse(data);T;'I"6def parse(data) Event.new(JSON.parse(data)) end;T;8T;9To; ; F; ;4;;;I"Isimud::Event.publish;F;[[I" *args;T0;[[@Fi_;F;: publish;;;[;{;IC;" ;T;"@!;60;7F;[;[;#I";T;$0;%@?;&I"def publish(*args);T;'I"6def publish(*args) Event.new(*args).publish end;T;8T;9To; ; F; ;4;;;I"Isimud::Event.dispatch;F;[;[[@Fic;F;: dispatch;;;[;{;IC;";T;"@0;60;7F;[;[;#I" ;T;$0;;0;%@?;&@.;'I"6def publish(*args) Event.new(*args).publish end;T;9To; ; F; ; ;;;I"Isimud::Event#publish;F;[;[[@Fif;F;;b;;;[;{;IC;" ;T;"@<;60;7F;[;[;#I";T;$0;%@?;&I"def publish;T;'I"def publish data = self.serialize log "Event#publish: #{self.inspect}", :debug Isimud.client.publish(exchange, routing_key, data) end;T;8T;9T: @owner@?:@class_mixinsIC;[;d@?:@instance_mixinsIC;[o:YARD::CodeObjects::Proxy :@orignameI"Isimud::Logging;T:@orignamespace@?: @imethod0;: Logging;%@: @objo; ;IC;[o; ; F; ; ;;;I"Isimud::Logging#log;F;[[I" message;T0[I" level;TI"Isimud.log_level;T;[[I"lib/isimud/logging.rb;Ti;F;:log;;;[;{;IC;" ;T;"@O;60;7F;[;[;#I";T;$0;%@M;&I"/def log(message, level = Isimud.log_level);T;'I"ddef log(message, level = Isimud.log_level) logger.send (level || :debug).to_sym , message end;T;8T;9To; ; F; ; ;;;I"Isimud::Logging#logger;F;[;[[@Yi ;F;;-;;;[;{;IC;" ;T;"@b;60;7F;[;[;#I";T;$0;%@M;&I"def logger;T;'I"#def logger Isimud.logger end;T;8T;9T;d@M;eIC;[;d@M;fIC;[;d@M:@attributesIC:SymbolHash{;4IC;o{:@symbolize_valueT; IC;o{;pT;pT: @aliases{: @groups[;[[@Yi;F;;k;;;;;[;{;IC;" ;T;"@M;60;7F;[;[;#I";T;$0;%@;I"Isimud::Logging;F;9T: @type: module;d@?;nIC;o{;4IC;o{;pT; IC;o{ ;DIC;o{: read@A: write@O;pT;FIC;o{;u@b;v@o;pT;HIC;o{;u@;v@;pT;JIC;o{;u@;v@;pT;LIC;o{;u@;v@;pT;NIC;o{;u@;v@;pT;PIC;o{;u@;v@;pT;]IC;o{;u@;v@";pT;pT;pT;q{;r[;[[@Fi ;F;: Event;;;;;[;{;IC;" ;T;"@?;60;7F;[;[;#I";T;$0;%@;I"Isimud::Event;F:@superclasso;g ;h0;i0;j0;: Object;%@;l0;s;4;9To;C;IC;[o; ; F; ; ;;;I"Isimud::Client#initialize;F;[[I" server;TI"nil;T[I" options;TI"nil;T;[[I"lib/isimud/client.rb;Ti ;F;;V;;;[;{;IC;" ;T;"@;60;7F;[;[o; ;I" return;F; I"a new instance of Client;T;0;![I" Client;F;"@;#I";T;$0;%@;&I"0def initialize(server = nil, options = nil);T;'I"4def initialize(server = nil, options = nil) end;T;8T;9To; ; F; ; ;;;I"Isimud::Client#bind;F;[ [I"queue_name;T0[I"exchange_name;T0[I" *keys;T0[I" &method;T0;[[@i;F;: bind;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@;&I"8def bind(queue_name, exchange_name, *keys, &method);T;'I"i;?i;%@;I"Isimud::Client;F;xo;g ;h0;i0;j0;;y;%@;l0;s;4;9To;S;[[I"lib/isimud/version.rb;Ti;F;: VERSION;;;;;[;{;IC;" ;T;"@w;60;7F;[;[;#I";T;$0;%@;I"Isimud::VERSION;F;&I"VERSION = '0.4.2';T;'I"VERSION = '0.4.2';T;UI" '0.4.2';T;9T@Mo;C;IC;[;d@;eIC;[;d@;fIC;[;d@;nIC;o{;4IC;o{;pT; IC;o{;pT;pT;q{;r[;[[I"lib/isimud/railtie.rb;Ti ;F;: Railtie;;;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@;I"Isimud::Railtie;F;xo;g ;hI"Rails::Railtie;T;i@;j0;;;%o;g ;h0;i0;j0;: Rails;%@;l0;s0;l0;s;4;9To;C;IC;[o; ; F; ; ;;;I"Isimud::TestClient#queues;F;[;[[I"lib/isimud/test_client.rb;Ti;F;: queues;;;[;{;IC;"*Returns the value of attribute queues ;T;"@;60;7F;[;[;#I"*Returns the value of attribute queues;T;$0;%@;&I"def queues;T;'I"def queues @queues end;T;9To; ; F; ; ;;;I"Isimud::TestClient#queues=;F;[[I" value;T0;[[@i;F;: queues=;;;[;{;IC;"Sets the attribute queues ;T;"@;60;7F;[;[o; ;I" param;F; I".the value to set the attribute queues to.;T;I" value;T;!0;"@;#I"USets the attribute queues @param value the value to set the attribute queues to.;T;$0;%@;&I"def queues=(value);T;'I"-def queues=(value) @queues = value end;T;9To; ; F; ; ;;;I")Isimud::TestClient#exception_handler;F;[[I" &block;T0;[[@i [@iU;F;;{;;;[;{;IC;"5Returns the value of attribute exception_handler ;T;"@;60;7F;[;[;#I"5Returns the value of attribute exception_handler;T;$0;%@;&I""def exception_handler(&block);T;'I"3def exception_handler @exception_handler end;T;8T;9To;C;IC;[ o; ; F; ; ;;;I"#Isimud::TestClient::Queue#name;F;[;[[@i ;F;: name;;;[;{;IC;"(Returns the value of attribute name ;T;"@;60;7F;[;[;#I"(Returns the value of attribute name;T;$0;%@;&I" def name;T;'I"def name @name end;T;9To; ; F; ; ;;;I"+Isimud::TestClient::Queue#routing_keys;F;[;[[@i ;F;:routing_keys;;;[;{;IC;"0Returns the value of attribute routing_keys ;T;"@;60;7F;[;[;#I"0Returns the value of attribute routing_keys;T;$0;%@;&I"def routing_keys;T;'I")def routing_keys @routing_keys end;T;9To; ; F; ; ;;;I")Isimud::TestClient::Queue#initialize;F;[[I" name;T0[I" listener;T0;[[@i;F;;V;;;[;{;IC;" ;T;"@;60;7F;[;[o; ;I" return;F; I"a new instance of Queue;T;0;![I" Queue;F;"@;#I";T;$0;%@;&I"#def initialize(name, listener);T;'I"sdef initialize(name, listener) @name = name @listener = listener @routing_keys = Set.new end;T;8T;9To; ; F; ; ;;;I"#Isimud::TestClient::Queue#bind;F;[[I" exchange;T0[I" options;TI"{};T;[[@i;F;;z;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@;&I"%def bind(exchange, options = {});T;'I"def bind(exchange, options = {}) key = options[:routing_key] @routing_keys << Regexp.new(key.gsub(/\./, "\\.").gsub(/\*/, ".*")) end;T;8T;9To; ; F; ; ;;;I"0Isimud::TestClient::Queue#has_matching_key?;F;[[I" route;T0;[[@i;F;:has_matching_key?;;;[;{;IC;" ;T;"@;60;7F;[;[o; ;I" return;F; I";T;0;![I" Boolean;T;"@;#I";T;$0;%@;&I"!def has_matching_key?(route);T;'I"Mdef has_matching_key?(route) @routing_keys.any? { |k| route =~ k } end;T;8T;9To; ; F; ; ;;;I"&Isimud::TestClient::Queue#publish;F;[[I" data;T0;[[@i;F;;b;;;[;{;IC;" ;T;"@&;60;7F;[;[;#I";T;$0;%@;&I"def publish(data);T;'I"def publish(data) begin @listener.call(data) rescue => e puts "TestClient: error delivering message: #{e.message}\n #{e.backtrace.join("\n ")}" @listener.exception_handler.try(:call, e) end end;T;8T;9T;d@;eIC;[;d@;fIC;[;d@;nIC;o{;4IC;o{;pT; IC;o{;IC;o{;u@;v0;pT;IC;o{;u@;v0;pT;pT;pT;q{;r[;[[@i ;F;: Queue;;;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@;I"Isimud::TestClient::Queue;F;xo;g ;h0;i0;j0;;y;%@;l0;s;4;9To; ; F; ; ;;;I""Isimud::TestClient#initialize;F;[[I"connection;TI"nil;T[I" options;TI"nil;T;[[@i';F;;V;;;[;{;IC;" ;T;"@H;60;7F;[;[o; ;I" return;F; I"!a new instance of TestClient;T;0;![I"TestClient;F;"@H;#I";T;$0;%@;&I"4def initialize(connection = nil, options = nil);T;'I"Qdef initialize(connection = nil, options = nil) self.queues = Hash.new end;T;8T;9To; ; F; ; ;;;I"Isimud::TestClient#connect;F;[;[[@i+;F;;@;;;[;{;IC;" ;T;"@`;60;7F;[;[;#I";T;$0;%@;&I"def connect;T;'I"def connect self end;T;8T;9To; ; F; ; ;;;I"Isimud::TestClient#channel;F;[;[[@i/;F;;{;;;[;{;IC;" ;T;"@m;60;7F;[;[;#I";T;$0;%@;&I"def channel;T;'I"def channel self end;T;8T;9To; ; F; ; ;;;I""Isimud::TestClient#connected?;F;[;[[@i3;F;;};;;[;{;IC;" ;T;"@z;60;7F;[;[o; ;I" return;F; I";T;0;![I" Boolean;T;"@z;#I";T;$0;%@;&I"def connected?;T;'I"def connected? true end;T;8T;9To; ; F; ; ;;;I"Isimud::TestClient#close;F;[;[[@i7;F;;|;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@;&I"def close;T;'I"def close end;T;8T;9To; ; F; ; ;;;I"$Isimud::TestClient#delete_queue;F;[[I"queue_name;T0;[[@i:;F;;;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@;&I"!def delete_queue(queue_name);T;'I"Adef delete_queue(queue_name) queues.delete(queue_name) end;T;8T;9To; ; F; ; ;;;I"Isimud::TestClient#bind;F;[ [I"queue_name;T0[I"exchange_name;T0[I" *keys;T0[I" &method;T0;[[@i>;F;;z;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@;&I"8def bind(queue_name, exchange_name, *keys, &method);T;'I"~def bind(queue_name, exchange_name, *keys, &method) create_queue(queue_name, exchange_name, routing_keys: keys, &method) end;T;8T;9To; ; F; ; ;;;I"$Isimud::TestClient#create_queue;F;[ [I"queue_name;T0[I"exchange_name;T0[I" options;TI"{};T[I" &method;T0;[[@iB;F;;~;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@;&I"Gdef create_queue(queue_name, exchange_name, options = {}, &method);T;'I"Kdef create_queue(queue_name, exchange_name, options = {}, &method) keys = options[:routing_keys] || [] log "Isimud::TestClient: Binding queue #{queue_name} for keys #{keys.inspect}" queue = queues[queue_name] ||= Queue.new(queue_name, method) keys.each do |k| queue.bind(exchange_name, routing_key: k) end queue end;T;8T;9To; ; F; ; ;;;I"Isimud::TestClient#publish;F;[[I" exchange;T0[I"routing_key;T0[I" payload;T0;[[@iL;F;;b;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@;&I"0def publish(exchange, routing_key, payload);T;'I"pdef publish(exchange, routing_key, payload) log "Isimud::TestClient: Delivering message key: #{routing_key} payload: #{payload}" call_queues = queues.values.select { |queue| queue.has_matching_key?(routing_key) } call_queues.each do |queue| log "Isimud::TestClient: Queue #{queue.name} matches routing key #{routing_key}" queue.publish(payload) end end;T;8T;9To; ; F; ; ;;;I"Isimud::TestClient#reset;F;[;[[@iY;F;;|;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@;&I"def reset;T;'I"&def reset self.queues.clear end;T;8T;9To; ; F; ; ;;;I"!Isimud::TestClient#reconnect;F;[;[[@i];F;;B;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@;&I"def reconnect;T;'I"def reconnect self end;T;8T;9To; ; F; ; ;;;I"Isimud::TestClient#logger;F;[;[[@ia;F;;-;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@;&I"def logger;T;'I"#def logger Isimud.logger end;T;8T;9T;d@;eIC;[;d@;fIC;[;d@;nIC;o{;4IC;o{;pT; IC;o{;IC;o{;u@;v@;pT;{IC;o{;u@;v0;pT;pT;pT;q{;r[;[[@i;F;:TestClient;;;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@;I"Isimud::TestClient;F;xo;g ;hI"Isimud::Client;T;i@;j0;;};%@;l@;s0;9To;C;IC;[o;S;[[I"lib/isimud/bunny_client.rb;Ti ;F;:DEFAULT_URL;;;;;[;{;IC;" ;T;"@#;60;7F;[;[;#I";T;$0;%@!;I"%Isimud::BunnyClient::DEFAULT_URL;F;&I"1DEFAULT_URL = 'amqp://guest:guest@localhost';T;'I"1DEFAULT_URL = 'amqp://guest:guest@localhost';T;UI"#'amqp://guest:guest@localhost';T;9To; ; F; ; ;;;I"Isimud::BunnyClient#url;F;[;[[@&i ;F;:url;;;[;{;IC;"'Returns the value of attribute url ;T;"@1;60;7F;[;[;#I"'Returns the value of attribute url;T;$0;%@!;&I" def url;T;'I"def url @url end;T;9To; ; F; ; ;;;I"#Isimud::BunnyClient#initialize;F;[[I" _url;TI"nil;T[I"_bunny_options;TI"{};T;[[@&i;F;;V;;;[;{;IC;" ;T;"@>;60;7F;[;[o; ;I" return;F; I""a new instance of BunnyClient;T;0;![I"BunnyClient;F;"@>;#I";T;$0;%@!;&I"4def initialize(_url = nil, _bunny_options = {});T;'I"def initialize(_url = nil, _bunny_options = {}) log "Isimud::BunnyClient.initialize: options = #{_bunny_options.inspect}" @url = _url || DEFAULT_URL @bunny_options = _bunny_options end;T;8T;9To; ; F; ; ;;;I"Isimud::BunnyClient#bind;F;[ [I"queue_name;T0[I"exchange_name;T0[I"*routing_keys;T0[I" &block;T0;[[@&i;F;;z;;;[;{;IC;" ;T;"@V;60;7F;[;[;#I";T;$0;%@!;&I"?def bind(queue_name, exchange_name, *routing_keys, &block);T;'I" def bind(queue_name, exchange_name, *routing_keys, &block) create_queue(queue_name, exchange_name, queue_options: {durable: true}, routing_keys: routing_keys, subscribe_options: {manual_ack: true}, &block) end;T;8T;9To; ; F; ; ;;;I"%Isimud::BunnyClient#create_queue;F;[ [I"queue_name;T0[I"exchange_name;T0[I" options;TI"{};T[I" &block;T0;[[@&i;F;;~;;;[;{;IC;" ;T;"@k;60;7F;[;[;#I";T;$0;%@!;&I"Fdef create_queue(queue_name, exchange_name, options = {}, &block);T;'I"def create_queue(queue_name, exchange_name, options = {}, &block) queue_options = options[:queue_options] || {} routing_keys = options[:routing_keys] || [] subscribe_options = options[:subscribe_options] || {} log "Isimud: create_queue #{queue_name}: queue_options=#{queue_options.inspect} routing_keys=#{routing_keys.join(',')} subscribe_options=#{subscribe_options.inspect}" current_channel = channel queue = current_channel.queue(queue_name, queue_options) routing_keys.each { |key| queue.bind(exchange_name, routing_key: key, nowait: false) } queue.subscribe(subscribe_options) do |delivery_info, properties, payload| begin log "Isimud: queue #{queue_name} received #{delivery_info.delivery_tag} routing_key: #{delivery_info.routing_key}" Thread.current['isimud_queue_name'] = queue_name Thread.current['isimud_delivery_info'] = delivery_info Thread.current['isimud_properties'] = properties block.call(payload) log "Isimud: queue #{queue_name} finished with #{delivery_info.delivery_tag}, acknowledging" current_channel.ack(delivery_info.delivery_tag) rescue => e log("Isimud: queue #{queue_name} error processing #{delivery_info.delivery_tag} payload #{payload.inspect}: #{e.class.name} #{e.message}\n #{e.backtrace.join("\n ")}", :warn) current_channel.reject(delivery_info.delivery_tag, Isimud.retry_failures) raise end end queue end;T;8T;9To; ; F; ; ;;;I"%Isimud::BunnyClient#delete_queue;F;[[I"queue_name;T0;[[@&i6;F;;;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@!;&I"!def delete_queue(queue_name);T;'I"Hdef delete_queue(queue_name) channel.queue(queue_name).delete end;T;8T;9To; ; F; ; ;;;I"#Isimud::BunnyClient#connection;F;[;[[@&i:;F;:connection;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@!;&I"def connection;T;'I"Wdef connection @connection ||= ::Bunny.new(url, @bunny_options).tap(&:start) end;T;8T;9To; ; F; ; ;;;I" Isimud::BunnyClient#connect;F;[;[[@&i>;F;;@;;;[;{;IC;";T;"@;60;7F;[;[;#I" ;T;$0;;0;%@!;&@;'I"Wdef connection @connection ||= ::Bunny.new(url, @bunny_options).tap(&:start) end;T;9To;S;[[@&i@;F;:CHANNEL_KEY;;;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@!;I"%Isimud::BunnyClient::CHANNEL_KEY;F;&I"1CHANNEL_KEY = :'isimud.bunny_client.channel';T;'I"0CHANNEL_KEY = :'isimud.bunny_client.channel;T;UI" isimud.bunny_client.channel;T;9To; ; F; ; ;;;I" Isimud::BunnyClient#channel;F;[;[[@&iB;F;;{;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@!;&I"def channel;T;'I"def channel if (channel = Thread.current[CHANNEL_KEY]).try(:open?) channel else new_channel = connection.channel new_channel.confirm_select new_channel.prefetch(Isimud.prefetch_count) if Isimud.prefetch_count Thread.current[CHANNEL_KEY] = new_channel end end;T;8T;9To; ; F; ; ;;;I"Isimud::BunnyClient#reset;F;[;[[@&iM;F;;|;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@!;&I"def reset;T;'I"2def reset connection.close_all_channels end;T;8T;9To; ; F; ; ;;;I"*Isimud::BunnyClient#exception_handler;F;[[I" &block;T0;[[@&iQ;F;;{;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@!;&I""def exception_handler(&block);T;'I"Ydef exception_handler(&block) channel.on_uncaught_exception do yield end end;T;8T;9To; ; F; ; ;;;I"#Isimud::BunnyClient#connected?;F;[;[[@&iW;F;;};;;[;{;IC;" ;T;"@;60;7F;[;[o; ;I" return;F; I";T;0;![I" Boolean;T;"@;#I";T;$0;%@!;&I"def connected?;T;'I":def connected? @connection && @connection.open? end;T;8T;9To; ; F; ; ;;;I"Isimud::BunnyClient#close;F;[;[[@&i[;F;;|;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@!;&I"def close;T;'I"@def close connection.close ensure @connection = nil end;T;8T;9To; ; F; ; ;;;I" Isimud::BunnyClient#publish;F;[[I" exchange;T0[I"routing_key;T0[I" payload;T0;[[@&ia;F;;b;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@!;&I"0def publish(exchange, routing_key, payload);T;'I"def publish(exchange, routing_key, payload) channel.topic(exchange, durable: true).publish(payload, routing_key: routing_key, persistent: true) end;T;8T;9To; ; F; ; ;;;I""Isimud::BunnyClient#reconnect;F;[;[[@&ie;F;;B;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@!;&I"def reconnect;T;'I"(def reconnect close connect end;T;8T;9T;d@!;eIC;[;d@!;fIC;[;d@!;nIC;o{;4IC;o{;pT; IC;o{;IC;o{;u@1;v0;pT;pT;pT;q{@;;r[;[[@&i ;F;:BunnyClient;;;;;[;{;IC;" ;T;"@!;60;7F;[;[;#I";T;$0;%@;I"Isimud::BunnyClient;F;xo;g ;hI"Isimud::Client;T;i@;j0;;};%@;l@;s0;9To; ;IC;[o;S;[[I" lib/isimud/model_watcher.rb;Ti;F;:DEFAULT_EXCHANGE;;;;;[;{;IC;" ;T;"@3;60;7F;[;[;#I";T;$0;%@1;I"+Isimud::ModelWatcher::DEFAULT_EXCHANGE;F;&I" DEFAULT_EXCHANGE = 'models';T;'I" DEFAULT_EXCHANGE = 'models';T;UI" 'models';T;9To;S;[[@6i;F;:IGNORED_COLUMNS;;;;;[;{;IC;" ;T;"@A;60;7F;[;[;#I";T;$0;%@1;I"*Isimud::ModelWatcher::IGNORED_COLUMNS;F;&I"IGNORED_COLUMNS = %w{id};T;'I"IGNORED_COLUMNS = %w{id};T;UI" %w{id};T;9To; ;IC;[ o; ; F; ; ;;;I"8Isimud::ModelWatcher::ClassMethods#watch_attributes;F;[[I"*attributes;T0;[[@6i%;T;:watch_attributes;;;[;{;IC;"Set attributes to observe and include in messages. Any property method with a return value may be included in the list of attributes. ;T;[;[o; ;I" param;F; I"$list of attributes / properties;T;I"attributes;T;![I"Array;T;"@P;#I"Set attributes to observe and include in messages. Any property method with a return value may be included in the list of attributes. @param [Array] attributes list of attributes / properties;T;$0;"@P;7F;;o;<;=F;>i";?i$;%@N;&I"&def watch_attributes(*attributes);T;'I"~def watch_attributes(*attributes) self.isimud_watch_attributes = attributes.flatten.map(&:to_sym) if attributes.present? end;T;8T;9To; ; F; ; ;;;I"4Isimud::ModelWatcher::ClassMethods#sync_include;F;[[I"_sync_includes;T0;[[@6i*;T;:sync_include;;;[;{;IC;"KInclude the following tables when fetching records for synchronization ;T;[;[;#I"KInclude the following tables when fetching records for synchronization;T;$0;"@f;7F;;o;<;=F;>i);?i);%@N;&I"%def sync_include(_sync_includes);T;'I"Odef sync_include(_sync_includes) self.sync_includes = _sync_includes end;T;8T;9To; ; F; ; ;;;I"3Isimud::ModelWatcher::ClassMethods#synchronize;F;[[I" options;TI"{};T;[[@6i4;T;:synchronize;;;[;{;IC;"Synchronize instances of this model with the data warehouse. This is accomplished by calling isimud_notify_updated() on each instance fetched from the database. ;T;[;[ o; ;I" param;F; I"synchronize options;T;I" options;T;![I" Hash;T;"@vo;Y ;I" option;F; 0;I" options;T;!0;Zo;[ ;I" option;F; I"`where_clause filter for limiting records to sync. By default, all records are synchronized.;T;I" :where;T;![I"ActiveRecord::Relation;T;\0;"@vo;Y ;I" option;F; 0;I" options;T;!0;Zo;[ ;I" option;F; I"_optional stream for writing progress. A '.' is printed for every 100 records synchronized.;T;I" :output;T;![I"IO;T;\0;"@vo; ;I" return;F; I"#number of records synchronized;T;0;![I" Integer;T;"@v;#I"Synchronize instances of this model with the data warehouse. This is accomplished by calling isimud_notify_updated() on each instance fetched from the database. @param [Hash] options synchronize options @option options [ActiveRecord::Relation] :where where_clause filter for limiting records to sync. By default, all records are synchronized. @option options [IO] :output optional stream for writing progress. A '.' is printed for every 100 records synchronized. @return [Integer] number of records synchronized;T;$0;"@v;7F;;o;<;=F;>i.;?i3;%@N;&I""def synchronize(options = {});T;'I"udef synchronize(options = {}) where_clause = options[:where] || {} output = options[:output] || nil count = 0 query = self.where(where_clause) query = query.includes(sync_includes) if sync_includes query.find_each do |m| next unless m.isimud_synchronize? begin m.isimud_sync rescue Bunny::ClientTimeout, Timeout::Error => e output && output.print("\n#{e}, sleeping for 10 seconds") sleep(10) m.isimud_sync end if (count += 1) % 100 == 0 output && output.print('.') end if (count % 1000) == 0 GC.start end end count end;T;8T;9To; ; F; ; ;;;I"AIsimud::ModelWatcher::ClassMethods#isimud_model_watcher_type;F;[;[[@6iM;F;:isimud_model_watcher_type;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@N;&I""def isimud_model_watcher_type;T;'I"gdef isimud_model_watcher_type (respond_to?(:base_class) ? base_class.name : name).demodulize end;T;8T;9T;d@N;eIC;[;d@N;fIC;[;d@N;nIC;o{;4IC;o{;pT; IC;o{;pT;pT;q{;r[;[[@6i!;F;:ClassMethods;;;;;[;{;IC;" ;T;"@N;60;7F;[;[;#I";T;$0;%@1;I"'Isimud::ModelWatcher::ClassMethods;F;9To; ; F; ; ;;;I"-Isimud::ModelWatcher#isimud_synchronize?;F;[;[[@6iS;T;:isimud_synchronize?;;;[;{;IC;"cOverride to set conditions for synchronizing this instance with the server (default is always) ;T;[;[o; ;I" return;F; I";T;0;![I" Boolean;T;"@;#I"cOverride to set conditions for synchronizing this instance with the server (default is always);T;$0;"@;7F;;o;<;=F;>iR;?iR;%@1;&I"def isimud_synchronize?;T;'I"'def isimud_synchronize? true end;T;8T;9To; ; F; ; ;;;I"%Isimud::ModelWatcher#isimud_sync;F;[;[[@6iW;F;:isimud_sync;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@1;&I"def isimud_sync;T;'I">def isimud_sync isimud_send_action_message(:update) end;T;8T;9To; ; F; ; ;:protected;I"/Isimud::ModelWatcher#isimud_notify_created;F;[;[[@6i];F;:isimud_notify_created;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@1;&I"def isimud_notify_created;T;'I"Hdef isimud_notify_created isimud_send_action_message(:create) end;T;8T;9To; ; F; ; ;;;I"/Isimud::ModelWatcher#isimud_notify_updated;F;[;[[@6ia;F;:isimud_notify_updated;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@1;&I"def isimud_notify_updated;T;'I"def isimud_notify_updated changed_attrs = previous_changes.symbolize_keys.keys attributes = isimud_watch_attributes || isimud_default_attributes isimud_send_action_message(:update) if (changed_attrs & attributes).any? end;T;8T;9To; ; F; ; ;;;I"1Isimud::ModelWatcher#isimud_notify_destroyed;F;[;[[@6ig;F;:isimud_notify_destroyed;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@1;&I" def isimud_notify_destroyed;T;'I"Kdef isimud_notify_destroyed isimud_send_action_message(:destroy) end;T;8T;9To; ; F; ; ;;;I"3Isimud::ModelWatcher#isimud_default_attributes;F;[;[[@6ik;F;:isimud_default_attributes;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@1;&I""def isimud_default_attributes;T;'I"Rdef isimud_default_attributes self.class.column_names - IGNORED_COLUMNS end;T;8T;9To; ; F; ; ;;;I"/Isimud::ModelWatcher#isimud_attribute_data;F;[;[[@6io;F;:isimud_attribute_data;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@1;&I"def isimud_attribute_data;T;'I"def isimud_attribute_data attributes = isimud_watch_attributes || isimud_default_attributes attributes.inject(Hash.new) { |hsh, attr| hsh[attr] = send(attr); hsh } end;T;8T;9To; ; F; ; ;;;I"5Isimud::ModelWatcher#isimud_model_watcher_schema;F;[;[[@6it;F;: isimud_model_watcher_schema;;;[;{;IC;" ;T;"@";60;7F;[;[;#I";T;$0;%@1;&I"$def isimud_model_watcher_schema;T;'I"def isimud_model_watcher_schema Isimud.config.model_watcher_schema || if defined?(Rails) Rails.configuration.database_configuration[Rails.env]['database'] end end;T;8T;9To; ; F; ; ;;;I"7Isimud::ModelWatcher#isimud_model_watcher_exchange;F;[;[[@6iz;F;:"isimud_model_watcher_exchange;;;[;{;IC;" ;T;"@/;60;7F;[;[;#I";T;$0;%@1;&I"&def isimud_model_watcher_exchange;T;'I"Qdef isimud_model_watcher_exchange Isimud.config.model_watcher_exchange end;T;8T;9To; ; F; ; ;;;I"3Isimud::ModelWatcher#isimud_model_watcher_type;F;[;[[@6i~;F;;;;;[;{;IC;" ;T;"@<;60;7F;[;[;#I";T;$0;%@1;&I""def isimud_model_watcher_type;T;'I"Mdef isimud_model_watcher_type self.class.isimud_model_watcher_type end;T;8T;9To; ; F; ; ;;;I":Isimud::ModelWatcher#isimud_model_watcher_routing_key;F;[[I" action;T0;[[@6i};F;:%isimud_model_watcher_routing_key;;;[;{;IC;" ;T;"@I;60;7F;[;[;#I";T;$0;%@1;&I"1def isimud_model_watcher_routing_key(action);T;'I"}def isimud_model_watcher_routing_key(action) [isimud_model_watcher_schema, isimud_model_watcher_type, action].join('.') end;T;8T;9To; ; F; ; ;;;I"4Isimud::ModelWatcher#isimud_send_action_message;F;[[I" action;T0;[[@6i;F;:isimud_send_action_message;;;[;{;IC;" ;T;"@X;60;7F;[;[;#I";T;$0;%@1;&I"+def isimud_send_action_message(action);T;'I"def isimud_send_action_message(action) return unless Isimud.model_watcher_enabled? && isimud_synchronize? payload = { schema: isimud_model_watcher_schema, type: isimud_model_watcher_type, action: action, id: id, timestamp: (updated_at || Time.now).utc } payload[:attributes] = isimud_attribute_data unless action == :destroy routing_key = isimud_model_watcher_routing_key(action) log "Isimud::ModelWatcher#publish: exchange #{isimud_model_watcher_exchange} routing_key #{routing_key} payload #{payload.inspect}" Isimud.client.publish(isimud_model_watcher_exchange, routing_key, payload.to_json) end;T;8T;9T;d@1;eIC;[o;g ;hI"ActiveSupport::Concern;T;i@;j0;: Concern;%o;g ;h0;i0;j0;:ActiveSupport;%@;l0;s0;l0;s;t;d@1;fIC;[o;g ;hI"Isimud::Logging;T;i@1;j0;;k;%@;l@M;s;t;d@1;nIC;o{;4IC;o{;pT; IC;o{;pT;pT;q{;r[;[[@6i ;T;:ModelWatcher;;;;;[;{;IC;"EActiveModel mixin for sending model updates to a message server. ;T;[;[;#I"EActiveModel mixin for sending model updates to a message server.;T;$0;"@1;7F;;o;<;=F;>i ;?i ;%@;I"Isimud::ModelWatcher;F;9To; ;IC;[ o:+YARD::CodeObjects::ClassVariableObject;[[I"!lib/isimud/event_observer.rb;Ti;F;:@@observed_models;;;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@};I"-Isimud::EventObserver::@@observed_models;F;&I""@@observed_models = Array.new;T;'I""@@observed_models = Array.new;T;UI"Array.new;T;9To; ; F; ; ;;;I"'Isimud::EventObserver#handle_event;F;[[I" event;T0;[[@i;T;:handle_event;;;[;{;IC;"1Event handling hook. Override in your class. ;T;[;[;#I"1Event handling hook. Override in your class.;T;$0;"@;7F;;o;<;=F;>i;?i;%@};&I"def handle_event(event);T;'I"}def handle_event(event) Rails.logger.warn("Isimud::EventObserver#handle_event not implemented for #{event_queue_name}") end;T;8T;9To; ; F; ; ;;;I"'Isimud::EventObserver#routing_keys;F;[;[[@i;T;;;;;[;{;IC;"NRouting keys that are bound to the event queue. Override in your subclass ;T;[;[;#I"NRouting keys that are bound to the event queue. Override in your subclass;T;$0;"@;7F;;o;<;=F;>i;?i;%@};&I"def routing_keys;T;'I"def routing_keys [] end;T;8T;9To; ; F; ; ;;;I")Isimud::EventObserver#observe_events;F;[[I" client;T0[I" exchange;T0;[[@i%;T;:observe_events;;;[;{;IC;"Create or attach to a queue on the specified exchange. When an event message that matches the observer's routing keys is received, parse the event and call handle_event on same. ;T;[;[;#I"Create or attach to a queue on the specified exchange. When an event message that matches the observer's routing keys is received, parse the event and call handle_event on same.;T;$0;"@;7F;;o;<;=F;>i#;?i$;%@};&I")def observe_events(client, exchange);T;'I"def observe_events(client, exchange) client.bind(self.class.event_queue_name(id), exchange, *routing_keys) do |message| event = Event.parse(message) handle_event(event) end end;T;8T;9To; ;IC;[o; ; F; ; ;;;I">Isimud::EventObserver::ClassMethods#find_active_observers;F;[;[[@i.;T;:find_active_observers;;;[;{;IC;"SMethod used to retrieve active observers. Override in your EventObserver class ;T;[;[;#I"SMethod used to retrieve active observers. Override in your EventObserver class;T;$0;"@;7F;;o;<;=F;>i-;?i-;%@;&I"def find_active_observers;T;'I"'def find_active_observers [] end;T;8T;9To; ; F; ; ;;;I"5Isimud::EventObserver::ClassMethods#queue_prefix;F;[;[[@i2;F;:queue_prefix;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@;&I"def queue_prefix;T;'I"Hdef queue_prefix Rails.application.class.parent_name.downcase end;T;8T;9To; ; F; ; ;;;I"9Isimud::EventObserver::ClassMethods#event_queue_name;F;[[I"id;T0;[[@i6;F;:event_queue_name;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@;&I"def event_queue_name(id);T;'I"\def event_queue_name(id) [queue_prefix, base_class.name.underscore, id].join('.') end;T;8T;9T;d@;eIC;[;d@;fIC;[;d@;nIC;o{;4IC;o{;pT; IC;o{;pT;pT;q{;r[;[[@i,;F;;;;;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%@};I"(Isimud::EventObserver::ClassMethods;F;9T;d@};eIC;[o;g ;hI"ActiveSupport::Concern;T;i@;j0;;;%o;g ;h0;i0;j0;;;%@;l0;s0;l0;s;t;d@};fIC;[o;g ;hI"Isimud::Logging;T;i@};j0;;k;%@;l@M;s;t;d@};nIC;o{;4IC;o{;pT; IC;o{;pT;pT;q{;r[;[[@i ;F;:EventObserver;;;;;[;{;IC;" ;T;"@};60;7F;[;[;#I";T;$0;%@;I"Isimud::EventObserver;F;9To;C;IC;["o; ; F; ; ;;;I"&Isimud::EventListener#error_count;F;[;[[I"!lib/isimud/event_listener.rb;Ti ;F;:error_count;;;[;{;IC;"/Returns the value of attribute error_count ;T;"@ ;60;7F;[;[;#I"/Returns the value of attribute error_count;T;$0;%@ ;&I"def error_count;T;'I"'def error_count @error_count end;T;9To; ; F; ; ;;;I")Isimud::EventListener#error_interval;F;[;[[@ i ;F;:error_interval;;;[;{;IC;"2Returns the value of attribute error_interval ;T;"@ ;60;7F;[;[;#I"2Returns the value of attribute error_interval;T;$0;%@ ;&I"def error_interval;T;'I"-def error_interval @error_interval end;T;9To; ; F; ; ;;;I"&Isimud::EventListener#error_limit;F;[;[[@ i ;F;:error_limit;;;[;{;IC;"/Returns the value of attribute error_limit ;T;"@+ ;60;7F;[;[;#I"/Returns the value of attribute error_limit;T;$0;%@ ;&I"def error_limit;T;'I"'def error_limit @error_limit end;T;9To; ; F; ; ;;;I"Isimud::EventListener#name;F;[;[[@ i ;F;;;;;[;{;IC;"(Returns the value of attribute name ;T;"@8 ;60;7F;[;[;#I"(Returns the value of attribute name;T;$0;%@ ;&I" def name;T;'I"def name @name end;T;9To; ; F; ; ;;;I"!Isimud::EventListener#queues;F;[;[[@ i ;F;;;;;[;{;IC;"*Returns the value of attribute queues ;T;"@E ;60;7F;[;[;#I"*Returns the value of attribute queues;T;$0;%@ ;&I"def queues;T;'I"def queues @queues end;T;9To; ; F; ; ;;;I"*Isimud::EventListener#events_exchange;F;[;[[@ i ;F;;*;;;[;{;IC;"3Returns the value of attribute events_exchange ;T;"@R ;60;7F;[;[;#I"3Returns the value of attribute events_exchange;T;$0;%@ ;&I"def events_exchange;T;'I"/def events_exchange @events_exchange end;T;9To; ; F; ; ;;;I"*Isimud::EventListener#models_exchange;F;[;[[@ i ;F;:models_exchange;;;[;{;IC;"3Returns the value of attribute models_exchange ;T;"@_ ;60;7F;[;[;#I"3Returns the value of attribute models_exchange;T;$0;%@ ;&I"def models_exchange;T;'I"/def models_exchange @models_exchange end;T;9To; ; F; ; ;;;I""Isimud::EventListener#running;F;[;[[@ i ;F;: running;;;[;{;IC;"+Returns the value of attribute running ;T;"@l ;60;7F;[;[;#I"+Returns the value of attribute running;T;$0;%@ ;&I"def running;T;'I"def running @running end;T;9To;S;[[@ i;F;:DEFAULT_ERROR_LIMIT;;;;;[;{;IC;" ;T;"@y ;60;7F;[;[;#I";T;$0;%@ ;I"/Isimud::EventListener::DEFAULT_ERROR_LIMIT;F;&I"DEFAULT_ERROR_LIMIT = 100;T;'I"DEFAULT_ERROR_LIMIT = 100;T;UI"100;T;9To;S;[[@ i;F;:DEFAULT_ERROR_INTERVAL;;;;;[;{;IC;" ;T;"@ ;60;7F;[;[;#I";T;$0;%@ ;I"2Isimud::EventListener::DEFAULT_ERROR_INTERVAL;F;&I""DEFAULT_ERROR_INTERVAL = 3600;T;'I""DEFAULT_ERROR_INTERVAL = 3600;T;UI" 3600;T;9To;S;[[@ i;F;:DEFAULT_EVENTS_EXCHANGE;;;;;[;{;IC;" ;T;"@ ;60;7F;[;[;#I";T;$0;%@ ;I"3Isimud::EventListener::DEFAULT_EVENTS_EXCHANGE;F;&I"'DEFAULT_EVENTS_EXCHANGE = 'events';T;'I"'DEFAULT_EVENTS_EXCHANGE = 'events';T;UI" 'events';T;9To;S;[[@ i;F;:DEFAULT_MODELS_EXCHANGE;;;;;[;{;IC;" ;T;"@ ;60;7F;[;[;#I";T;$0;%@ ;I"3Isimud::EventListener::DEFAULT_MODELS_EXCHANGE;F;&I"'DEFAULT_MODELS_EXCHANGE = 'models';T;'I"'DEFAULT_MODELS_EXCHANGE = 'models';T;UI" 'models';T;9To; ; F; ; ;;;I"%Isimud::EventListener#initialize;F;[[I" options;TI"{};T;[[@ i;F;;V;;;[;{;IC;" ;T;"@ ;60;7F;[;[o; ;I" return;F; I"$a new instance of EventListener;T;0;![I"EventListener;F;"@ ;#I";T;$0;%@ ;&I"!def initialize(options = {});T;'I"def initialize(options = {}) default_options = { error_limit: Isimud.listener_error_limit || DEFAULT_ERROR_LIMIT, error_interval: DEFAULT_ERROR_INTERVAL, events_exchange: Isimud.events_exchange || DEFAULT_EVENTS_EXCHANGE, models_exchange: Isimud.model_watcher_exchange || DEFAULT_MODELS_EXCHANGE, name: "#{Rails.application.class.parent_name.downcase}-listener" } options.reverse_merge!(default_options) @error_count = 0 @observers = Hash.new @observed_models = Set.new @events_exchange = options[:events_exchange] || DEFAULT_EVENTS_EXCHANGE @models_exchange = options[:models_exchange] || DEFAULT_MODELS_EXCHANGE @error_limit = options[:error_limit] || DEFAULT_ERROR_LIMIT @error_interval = options[:error_interval] || DEFAULT_ERROR_INTERVAL @name = options[:name] @observer_mutex = Mutex.new @running = false end;T;8T;9To; ; F; ; ;;;I"%Isimud::EventListener#max_errors;F;[;[[@ i*;F;:max_errors;;;[;{;IC;" ;T;"@ ;60;7F;[;[;#I";T;$0;%@ ;&I"def max_errors;T;'I"Ldef max_errors Isimud.listener_error_limit || DEFAULT_ERROR_LIMIT end;T;8T;9To; ; F; ; ;;;I"$Isimud::EventListener#test_env?;F;[;[[@ i.;F;:test_env?;;;[;{;IC;" ;T;"@ ;60;7F;[;[o; ;I" return;F; I";T;0;![I" Boolean;T;"@ ;#I";T;$0;%@ ;&I"def test_env?;T;'I"Adef test_env? ['cucumber', 'test'].include?(Rails.env) end;T;8T;9To; ; F; ; ;;;I"Isimud::EventListener#run;F;[;[[@ i2;F;:run;;;[;{;IC;" ;T;"@ ;60;7F;[;[;#I";T;$0;%@ ;&I" def run;T;'I"3def run @running = true bind_queues and return if test_env? start_shutdown_thread start_error_counter_thread client.connect client.exception_handler(&method(:count_error)) start_event_thread puts 'EventListener started. Hit Ctrl-C to exit' Thread.stop puts 'Exiting.' client.close end;T;8T;9To; ; F; ; ;;;I"&Isimud::EventListener#bind_queues;F;[;[[@ iB;T;:bind_queues;;;[;{;IC;"5Override this method to set up message observers ;T;[;[;#I"5Override this method to set up message observers;T;$0;"@ ;7F;;o;<;=F;>iA;?iA;%@ ;&I"def bind_queues;T;'I"def bind_queues EventObserver.observed_models.each do |model_class| model_class.find_active_observers.each do |model| register_observer(model) end end end;T;8T;9To; ; F; ; ;;;I"(Isimud::EventListener#has_observer?;F;[[I" observer;T0;[[@ iJ;F;:has_observer?;;;[;{;IC;" ;T;"@ ;60;7F;[;[o; ;I" return;F; I";T;0;![I" Boolean;T;"@ ;#I";T;$0;%@ ;&I" def has_observer?(observer);T;'I"idef has_observer?(observer) @observers.has_key?(observer_key_for(observer.class, observer.id)) end;T;8T;9To; ; F; ; ;: private;I"0Isimud::EventListener#start_shutdown_thread;F;[;[[@ iQ;F;:start_shutdown_thread;;;[;{;IC;" ;T;"@ ;60;7F;[;[;#I";T;$0;%@ ;&I"def start_shutdown_thread;T;'I"6def start_shutdown_thread shutdown_thread = Thread.new do Thread.stop # wait until we get a TERM or INT signal. log 'EventListener: shutdown requested. Shutting down AMQP...', :info @running = false Thread.main.run end %w(INT TERM).each { |sig| trap(sig) { shutdown_thread.wakeup } } end;T;8T;9To; ; F; ; ;;;I"!Isimud::EventListener#client;F;[;[[@ i[;F;;:;;;[;{;IC;" ;T;"@ ;60;7F;[;[;#I";T;$0;%@ ;&I"def client;T;'I"#def client Isimud.client end;T;8T;9To; ; F; ; ;;;I"-Isimud::EventListener#start_event_thread;F;[;[[@ i_;F;:start_event_thread;;;[;{;IC;" ;T;"@* ;60;7F;[;[;#I";T;$0;%@ ;&I"def start_event_thread;T;'I"Cdef start_event_thread Thread.new do log 'EventListener: starting event_thread' while @running begin bind_queues Thread.stop rescue Bunny::Exception => e count_error(e) Rails.logger.warn 'EventListener: resetting queues' client.reset end end end end;T;8T;9To; ; F; ; ;;;I"&Isimud::EventListener#count_error;F;[[I"exception;T0;[[@ io;F;:count_error;;;[;{;IC;" ;T;"@7 ;60;7F;[;[;#I";T;$0;%@ ;&I"def count_error(exception);T;'I"6def count_error(exception) @error_count += 1 log "EventListsner: caught error #{exception.inspect}, count = #{@error_count}", :warn if (@error_count > error_limit) && @running log 'EventListener: too many errors, exiting', :fatal @running = false Thread.main.wakeup unless test_env? end end;T;8T;9To; ; F; ; ;;;I"5Isimud::EventListener#start_error_counter_thread;F;[;[[@ iz;T;:start_error_counter_thread;;;[;{;IC;"Lstart an error counter thread that clears the error count once per hour ;T;[;[;#I"Lstart an error counter thread that clears the error count once per hour;T;$0;"@F ;7F;;o;<;=F;>iy;?iy;%@ ;&I"#def start_error_counter_thread;T;'I"def start_error_counter_thread log 'EventListener: starting error counter' @error_count = 0 Thread.new do while true sleep(error_interval) log 'EventListener: resetting error counter' @error_count = 0 end end end;T;8T;9To; ; F; ; ;;;I"0Isimud::EventListener#handle_observer_event;F;[[I" payload;T0;[[@ i;F;:handle_observer_event;;;[;{;IC;" ;T;"@T ;60;7F;[;[;#I";T;$0;%@ ;&I"'def handle_observer_event(payload);T;'I"def handle_observer_event(payload) event = JSON.parse(payload).with_indifferent_access log "EventListener: received observer model message: #{payload.inspect}" if %w(update destroy).include?(event[:action]) unregister_observer(event[:type], event[:id]) end unless event[:action] == 'destroy' observer = event[:type].constantize.find(event[:id]) register_observer(observer) end end;T;8T;9To; ; F; ; ;;;I",Isimud::EventListener#register_observer;F;[[I" observer;T0;[[@ i;T;:register_observer;;;[;{;IC;"qCreate and bind a queue for the observer. Also ensure that we are listening for observer class update events ;T;[;[;#I"qCreate and bind a queue for the observer. Also ensure that we are listening for observer class update events;T;$0;"@c ;7F;;o;<;=F;>i;?i;%@ ;&I"$def register_observer(observer);T;'I"Adef register_observer(observer) register_observer_class(observer.class) @observer_mutex.synchronize do log "EventListener: registering observer #{observer.class} #{observer.id}" observer.observe_events(client, events_exchange) @observers[observer_key_for(observer.class, observer.id)] = observer end end;T;8T;9To; ; F; ; ;;;I".Isimud::EventListener#unregister_observer;F;[[I"observer_class;T0[I"observer_id;T0;[[@ i;T;:unregister_observer;;;[;{;IC;"UDelete a queue for an observer. This also purges all messages associated with it ;T;[;[;#I"UDelete a queue for an observer. This also purges all messages associated with it;T;$0;"@s ;7F;;o;<;=F;>i;?i;%@ ;&I"9def unregister_observer(observer_class, observer_id);T;'I" def unregister_observer(observer_class, observer_id) @observer_mutex.synchronize do if (observer = @observers.delete(observer_key_for(observer_class, observer_id))) begin log "EventListener: unregistering #{observer.class} #{observer.id}" queue_name = observer_class.constantize.event_queue_name(observer_id) client.delete_queue(queue_name) rescue => e log "EventListener: error unregistering #{observer_class} #{observer_id}: #{e.message}", :warn end end end end;T;8T;9To; ; F; ; ;;;I")Isimud::EventListener#observer_queue;F;[;[[@ i;T;:observer_queue;;;[;{;IC;"NCreate or return the observer queue which listens for ModelWatcher events ;T;[;[;#I"NCreate or return the observer queue which listens for ModelWatcher events;T;$0;"@ ;7F;;o;<;=F;>i;?i;%@ ;&I"def observer_queue;T;'I"'def observer_queue @observer_queue ||= client.create_queue("", Isimud.model_watcher_exchange, queue_options: {exclusive: true}, subscribe_options: {manual_ack: true}, &method(:handle_observer_event)) end;T;8T;9To; ; F; ; ;;;I"2Isimud::EventListener#register_observer_class;F;[[I"observer_class;T0;[[@ i;T;:register_observer_class;;;[;{;IC;"(Register the observer class watcher ;T;[;[;#I"(Register the observer class watcher;T;$0;"@ ;7F;;o;<;=F;>i;?i;%@ ;&I"0def register_observer_class(observer_class);T;'I"def register_observer_class(observer_class) @observer_mutex.synchronize do return if @observed_models.include?(observer_class) @observed_models << observer_class log "EventListener: registering observer class #{observer_class}" observer_queue.bind(Isimud.model_watcher_exchange, routing_key: "#{Isimud.model_watcher_schema}.#{observer_class.base_class.name}.*") end end;T;8T;9To; ; F; ; ;;;I"+Isimud::EventListener#observer_key_for;F;[[I" type;T0[I"id;T0;[[@ i;F;:observer_key_for;;;[;{;IC;" ;T;"@ ;60;7F;[;[;#I";T;$0;%@ ;&I"#def observer_key_for(type, id);T;'I"Hdef observer_key_for(type, id) [type.to_s, id.to_s].join(':') end;T;8T;9T;d@ ;eIC;[;d@ ;fIC;[o;g ;h0;i0;j0;;k;%@;l@M;s;t;d@ ;nIC;o{;4IC;o{;pT; IC;o{ ;IC;o{;u@ ;v0;pT;IC;o{;u@ ;v0;pT;IC;o{;u@+ ;v0;pT;IC;o{;u@8 ;v0;pT;IC;o{;u@E ;v0;pT;*IC;o{;u@R ;v0;pT;IC;o{;u@_ ;v0;pT;IC;o{;u@l ;v0;pT;pT;pT;q{;r[;[[@ i ;F;:EventListener;;;;;[;{;IC;" ;T;"@ ;60;7F;[;[;#I";T;$0;%@;I"Isimud::EventListener;F;xo;g ;h0;i0;j0;;y;%@;l0;s;4;9To; ;IC;[o;C;IC;[o; ; F; ; ;;;I";Isimud::Generators::ConfigGenerator#create_config_file;F;[;[[I"4lib/rails/generators/isimud/config_generator.rb;Ti ;F;:create_config_file;;;[;{;IC;" ;T;"@ ;60;7F;[;[;#I";T;$0;%@ ;&I"def create_config_file;T;'I"fdef create_config_file template 'isimud.yml', File.join(Rails.root, 'config', 'isimud.yml') end;T;8T;9T;d@ ;eIC;[;d@ ;fIC;[;d@ ;nIC;o{;4IC;o{;pT; IC;o{;pT;pT;q{;r[;[[@ i;F;:ConfigGenerator;;;;;[;{;IC;" ;T;"@ ;60;7F;[;[;#I";T;$0;%@ ;I"(Isimud::Generators::ConfigGenerator;F;xo;g ;hI"Rails::Generators::Base;T;i@ ;j0;: Base;%o;g ;hI"Rails::Generators;T;i@ ;j0;:Generators;%o;g ;h0;i0;j0;;;%@ ;l0;s0;l0;s0;l0;s;4;9To;C;IC;[o; ; F; ; ;;;I"EIsimud::Generators::InitializerGenerator#create_initializer_file;F;[;[[I"9lib/rails/generators/isimud/initializer_generator.rb;Ti ;F;:create_initializer_file;;;[;{;IC;" ;T;"@ ;60;7F;[;[;#I";T;$0;%@ ;&I" def create_initializer_file;T;'I"~def create_initializer_file template 'initializer.rb', File.join(Rails.root, 'config', 'initializers', 'isimud.rb') end;T;8T;9T;d@ ;eIC;[;d@ ;fIC;[;d@ ;nIC;o{;4IC;o{;pT; IC;o{;pT;pT;q{;r[;[[@ i;F;:InitializerGenerator;;;;;[;{;IC;" ;T;"@ ;60;7F;[;[;#I";T;$0;%@ ;I"-Isimud::Generators::InitializerGenerator;F;xo;g ;hI"Rails::Generators::Base;T;i@ ;j0;;;%o;g ;hI"Rails::Generators;T;i@ ;j0;;;%o;g ;h0;i0;j0;;;%@ ;l0;s0;l0;s0;l0;s;4;9T;d@ ;eIC;[;d@ ;fIC;[;d@ ;nIC;o{;4IC;o{;pT; IC;o{;pT;pT;q{;r[;[[@ i[@ i;F;;;;;;;[;{;IC;" ;T;"@ ;60;7F;[;[;#I";T;$0;%@;I"Isimud::Generators;F;9T;d@;eIC;[;d@;fIC;[o;g ;hI" ActiveSupport::Configurable;T;i@;j0;:Configurable;%o;g ;h0;i0;j0;;;%@;l0;s0;l0;s;t;d@;nIC;o{;4IC;o{;pT; IC;o{;IC;o{;u@ ;v0;pT;(IC;o{;u@;v0;pT;)IC;o{;u@/;v0;pT;*IC;o{;u@A;v0;pT;+IC;o{;u@S;v0;pT;,IC;o{;u@e;v0;pT;-IC;o{;u@w;v0;pT;.IC;o{;u@;v0;pT;/IC;o{;u@;v0;pT;0IC;o{;u@;v0;pT;1IC;o{;u@;v0;pT;2IC;o{;u@;v0;pT;3IC;o{;u@;v0;pT;pT;pT;q{;r[;[[@i [@i[@Fi[@i[@zi[@Yi[@i[@i[@&i [@6i [@ i [@ i[@ i;T;: Isimud;;;;;[;{;IC;"1Module for attaching and listening to events ;T;[;[;#I"1Module for attaching and listening to events;T;$0;"@;7F;;o;<;=F;>i ;?i ;%@;I" Isimud;F;d@;eIC;[;d@;fIC;[;d@;nIC;o{;4IC;o{;pT; IC;o{;pT;pT;q{;r[;[;F;;;;;;;[;{;IC;" ;T;"@;60;7F;[;[;#I";T;$0;%0;I";T;@:Isimud#client_type@ :Isimud#client_options@:Isimud#default_client@/:Isimud#events_exchange@A: Isimud#enable_model_watcher@S: Isimud#listener_error_limit@e:Isimud#logger@w:Isimud#log_level@:"Isimud#model_watcher_exchange@: Isimud#model_watcher_schema@:Isimud#prefetch_count@:Isimud#retry_failures@:Isimud#server@:Isimud.client_class@:Isimud.client@:Isimud.connect@:"Isimud.model_watcher_enabled?@:Isimud.reconnect@1:Isimud::Event@?:Isimud::Event#type@A:Isimud::Event#type=@O:Isimud::Event#action@b:Isimud::Event#action=@o:Isimud::Event#user_id@:Isimud::Event#user_id=@:Isimud::Event#occurred_at@:Isimud::Event#occurred_at=@: Isimud::Event#eventful_type@:!Isimud::Event#eventful_type=@:Isimud::Event#eventful_id@:Isimud::Event#eventful_id=@:Isimud::Event#parameters@:Isimud::Event#parameters=@:Isimud::Event#exchange=@": Isimud::Event::DEFAULT_TYPE@5:Isimud::Event#initialize@B:Isimud::Event#exchange@:Isimud::Event#routing_key@:Isimud::Event#as_json@:Isimud::Event#serialize@:Isimud::Event.parse@:Isimud::Event.publish@!:Isimud::Event.dispatch@0:Isimud::Event#publish@<:Isimud::Client@:Isimud::Client#initialize@:Isimud::Client#bind@:Isimud::Client#channel@:Isimud::Client#close@:Isimud::Client#connect@:Isimud::Client#connected?@: Isimud::Client#create_queue@: Isimud::Client#delete_queue@:%Isimud::Client#exception_handler@$:Isimud::Client#publish@3:Isimud::Client#reconnect@F:Isimud::Client#reset@S:Isimud::VERSION@w:Isimud::Logging@M:Isimud::Logging#log@O:Isimud::Logging#logger@b:Isimud::Railtie@:Isimud::TestClient@:Isimud::TestClient#queues@:Isimud::TestClient#queues=@:)Isimud::TestClient#exception_handler@:Isimud::TestClient::Queue@:#Isimud::TestClient::Queue#name@:+Isimud::TestClient::Queue#routing_keys@:)Isimud::TestClient::Queue#initialize@:#Isimud::TestClient::Queue#bind@:0Isimud::TestClient::Queue#has_matching_key?@:&Isimud::TestClient::Queue#publish@&:"Isimud::TestClient#initialize@H:Isimud::TestClient#connect@`:Isimud::TestClient#channel@m:"Isimud::TestClient#connected?@z:Isimud::TestClient#close@:$Isimud::TestClient#delete_queue@:Isimud::TestClient#bind@:$Isimud::TestClient#create_queue@:Isimud::TestClient#publish@:Isimud::TestClient#reset@:!Isimud::TestClient#reconnect@:Isimud::TestClient#logger@:Isimud::BunnyClient@!:%Isimud::BunnyClient::DEFAULT_URL@#:Isimud::BunnyClient#url@1:#Isimud::BunnyClient#initialize@>:Isimud::BunnyClient#bind@V:%Isimud::BunnyClient#create_queue@k:%Isimud::BunnyClient#delete_queue@:#Isimud::BunnyClient#connection@: Isimud::BunnyClient#connect@:%Isimud::BunnyClient::CHANNEL_KEY@: Isimud::BunnyClient#channel@:Isimud::BunnyClient#reset@:*Isimud::BunnyClient#exception_handler@:#Isimud::BunnyClient#connected?@:Isimud::BunnyClient#close@: Isimud::BunnyClient#publish@:"Isimud::BunnyClient#reconnect@:Isimud::ModelWatcher@1:+Isimud::ModelWatcher::DEFAULT_EXCHANGE@3:*Isimud::ModelWatcher::IGNORED_COLUMNS@A:'Isimud::ModelWatcher::ClassMethods@N:8Isimud::ModelWatcher::ClassMethods#watch_attributes@P:4Isimud::ModelWatcher::ClassMethods#sync_include@f:3Isimud::ModelWatcher::ClassMethods#synchronize@v:AIsimud::ModelWatcher::ClassMethods#isimud_model_watcher_type@:-Isimud::ModelWatcher#isimud_synchronize?@:%Isimud::ModelWatcher#isimud_sync@:/Isimud::ModelWatcher#isimud_notify_created@:/Isimud::ModelWatcher#isimud_notify_updated@:1Isimud::ModelWatcher#isimud_notify_destroyed@:3Isimud::ModelWatcher#isimud_default_attributes@:/Isimud::ModelWatcher#isimud_attribute_data@:5Isimud::ModelWatcher#isimud_model_watcher_schema@":7Isimud::ModelWatcher#isimud_model_watcher_exchange@/:3Isimud::ModelWatcher#isimud_model_watcher_type@<::Isimud::ModelWatcher#isimud_model_watcher_routing_key@I:4Isimud::ModelWatcher#isimud_send_action_message@X:Isimud::EventObserver@}:-Isimud::EventObserver::@@observed_models@:'Isimud::EventObserver#handle_event@:'Isimud::EventObserver#routing_keys@:)Isimud::EventObserver#observe_events@:(Isimud::EventObserver::ClassMethods@:>Isimud::EventObserver::ClassMethods#find_active_observers@:5Isimud::EventObserver::ClassMethods#queue_prefix@:9Isimud::EventObserver::ClassMethods#event_queue_name@:Isimud::EventListener@ :&Isimud::EventListener#error_count@ :)Isimud::EventListener#error_interval@ :&Isimud::EventListener#error_limit@+ :Isimud::EventListener#name@8 :!Isimud::EventListener#queues@E :*Isimud::EventListener#events_exchange@R :*Isimud::EventListener#models_exchange@_ :"Isimud::EventListener#running@l :/Isimud::EventListener::DEFAULT_ERROR_LIMIT@y :2Isimud::EventListener::DEFAULT_ERROR_INTERVAL@ :3Isimud::EventListener::DEFAULT_EVENTS_EXCHANGE@ :3Isimud::EventListener::DEFAULT_MODELS_EXCHANGE@ :%Isimud::EventListener#initialize@ :%Isimud::EventListener#max_errors@ :$Isimud::EventListener#test_env?@ :Isimud::EventListener#run@ :&Isimud::EventListener#bind_queues@ :(Isimud::EventListener#has_observer?@ :0Isimud::EventListener#start_shutdown_thread@ :!Isimud::EventListener#client@ :-Isimud::EventListener#start_event_thread@* :&Isimud::EventListener#count_error@7 :5Isimud::EventListener#start_error_counter_thread@F :0Isimud::EventListener#handle_observer_event@T :,Isimud::EventListener#register_observer@c :.Isimud::EventListener#unregister_observer@s :)Isimud::EventListener#observer_queue@ :2Isimud::EventListener#register_observer_class@ :+Isimud::EventListener#observer_key_for@ :Isimud::Generators@ :(Isimud::Generators::ConfigGenerator@ :;Isimud::Generators::ConfigGenerator#create_config_file@ :-Isimud::Generators::InitializerGenerator@ :EIsimud::Generators::InitializerGenerator#create_initializer_file@