Sha256: a37b54d56e36a49a6f9f9ce62f36b76d1c2156632f7598e588b2f1ab4a7c8e87

Contents?: true

Size: 512 Bytes

Versions: 119

Compression:

Stored size: 512 Bytes

Contents

module Mumukit::Nuntius::EventConsumer
  def self.handled_events
    @@handlers.keys
  end
end

logger = Mumukit::Nuntius::Logger
namespace :laboratory do
  namespace :events do
    task listen: :environment do
      logger.info 'Loading event handlers....'
      require_relative '../mumuki/laboratory/events/events'
      logger.info "Loaded handlers #{Mumukit::Nuntius::EventConsumer.handled_events}!"

      logger.info 'Listening to events...'
      Mumukit::Nuntius::EventConsumer.start!
    end
  end
end

Version data entries

119 entries across 119 versions & 1 rubygems

Version Path
mumuki-laboratory-9.23.0 lib/tasks/events.rake
mumuki-laboratory-9.22.0 lib/tasks/events.rake
mumuki-laboratory-9.21.0 lib/tasks/events.rake
mumuki-laboratory-9.20.1 lib/tasks/events.rake
mumuki-laboratory-9.20.0 lib/tasks/events.rake
mumuki-laboratory-9.19.0 lib/tasks/events.rake
mumuki-laboratory-9.18.1 lib/tasks/events.rake
mumuki-laboratory-9.18.0 lib/tasks/events.rake
mumuki-laboratory-9.17.0 lib/tasks/events.rake
mumuki-laboratory-9.16.0 lib/tasks/events.rake
mumuki-laboratory-9.15.0 lib/tasks/events.rake
mumuki-laboratory-9.14.1 lib/tasks/events.rake
mumuki-laboratory-9.14.0 lib/tasks/events.rake
mumuki-laboratory-9.13.2 lib/tasks/events.rake
mumuki-laboratory-9.13.1 lib/tasks/events.rake
mumuki-laboratory-9.13.0 lib/tasks/events.rake
mumuki-laboratory-9.12.1 lib/tasks/events.rake
mumuki-laboratory-9.12.0 lib/tasks/events.rake
mumuki-laboratory-9.11.0 lib/tasks/events.rake
mumuki-laboratory-9.10.0 lib/tasks/events.rake