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.0.5 lib/tasks/events.rake
mumuki-laboratory-9.0.4 lib/tasks/events.rake
mumuki-laboratory-9.0.3 lib/tasks/events.rake
mumuki-laboratory-9.0.2 lib/tasks/events.rake
mumuki-laboratory-9.0.1 lib/tasks/events.rake
mumuki-laboratory-9.0.0 lib/tasks/events.rake
mumuki-laboratory-8.6.1 lib/tasks/events.rake
mumuki-laboratory-8.6.0 lib/tasks/events.rake
mumuki-laboratory-8.5.0 lib/tasks/events.rake
mumuki-laboratory-8.4.0 lib/tasks/events.rake
mumuki-laboratory-8.3.0 lib/tasks/events.rake
mumuki-laboratory-8.2.1 lib/tasks/events.rake
mumuki-laboratory-8.2.0 lib/tasks/events.rake
mumuki-laboratory-8.1.3 lib/tasks/events.rake
mumuki-laboratory-8.1.2 lib/tasks/events.rake
mumuki-laboratory-8.1.1 lib/tasks/events.rake
mumuki-laboratory-8.1.0 lib/tasks/events.rake
mumuki-laboratory-7.12.3 lib/tasks/events.rake
mumuki-laboratory-8.0.0 lib/tasks/events.rake
mumuki-laboratory-7.12.1 lib/tasks/events.rake