lib/tasks/messages.rake in mumuki-laboratory-6.4.1 vs lib/tasks/messages.rake in mumuki-laboratory-6.4.2

- old
+ new

@@ -1,15 +1,17 @@ logger = Mumukit::Nuntius::Logger -namespace :messages do - task listen: :environment do - logger.info 'Listening to messages' +namespace :laboratory do + namespace :messages do + task listen: :environment do + logger.info 'Listening to messages' - Mumukit::Nuntius::Consumer.start 'teacher-messages', 'teacher-messages' do |_delivery_info, _properties, body| - begin - Message.import_from_resource_h!(body) - rescue ActiveRecord::RecordInvalid => e - logger.info e + Mumukit::Nuntius::Consumer.start 'teacher-messages', 'teacher-messages' do |_delivery_info, _properties, body| + begin + Message.import_from_resource_h!(body) + rescue ActiveRecord::RecordInvalid => e + logger.info e + end end end end end