Class: Killbill::HelloWorld::HelloWorldPlugin
- Inherits:
-
Plugin::Notification
- Object
- Plugin::Notification
- Killbill::HelloWorld::HelloWorldPlugin
- Defined in:
- lib/helloworld.rb
Instance Method Summary collapse
Instance Method Details
#after_request ⇒ Object
18 19 20 21 |
# File 'lib/helloworld.rb', line 18 def after_request # return DB connections to the Pool if required ActiveRecord::Base.connection.close end |
#on_event(event) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/helloworld.rb', line 23 def on_event(event) if @listener.nil? logger.warn "HelloWorldPlugin wasn't started properly - check logs" return end @listener.update(event.account_id, event.tenant_id) if [:ACCOUNT_CREATION, :ACCOUNT_CHANGE].include?(event.event_type) end |
#start_plugin ⇒ Object
13 14 15 16 |
# File 'lib/helloworld.rb', line 13 def start_plugin super @listener = Killbill::HelloWorld::Initializer.instance.initialize!(@conf_dir, @kb_apis, @logger) end |