Skip to content
Browse files

Remove the listener again, now that preview testing is complete and t…

…he issue has been replicated.

This reverts commit 49c20f7.
  • Loading branch information...
1 parent 49c20f7 commit 8ba4ec00d8937b3c84544ea8e4f17c5ce7a5aedc @JordanHatch JordanHatch committed Jan 12, 2012
Showing with 1 addition and 43 deletions.
  1. +0 −36 lib/publication_listener.rb
  2. +1 −7 lib/tasks/messenger.rake
View
36 lib/publication_listener.rb
@@ -1,36 +0,0 @@
-class PublicationListener
- def listen
- Signal.trap('TERM') do
- client.close
- exit
- end
-
- marples = Messenger.instance.client
-
- marples.when 'publisher', '*', 'updated' do |publication|
- logger.info "Found publication #{publication}"
-
- begin
- logger.info "Processing artefact #{publication['panopticon_id']}"
- logger.info "Publication #{publication['_id']}"
-
- artefact = Artefact.find(publication['panopticon_id'])
- artefact.update_attribute :publication_id, publication['_id']
-
- logger.info 'Artefact saved'
- rescue => e
- logger.error "Unable to process message #{publication}"
- logger.error [e.message, e.backtrace].flatten.join("\n")
- end
-
- logger.info "Finished processing message #{publication}"
- end
-
- logger.info 'Listening for updated objects in Publisher'
- marples.join
- end
-
- def logger
- @logger ||= Rails.logger
- end
-end
View
8 lib/tasks/messenger.rake
@@ -6,13 +6,7 @@ namespace :messenger do
Rake::Task["environment"].invoke
DeletedPublicationListener.new.listen
end
-
- Daemonette.run("panopticon_publication_listener") do
- require "publication_listener.rb"
- Rake::Task["environment"].invoke
- PublicationListener.new.listen
- end
-
+
Daemonette.run('panopticon_contact_listener') do
require 'contact_listener.rb'
Rake::Task['environment'].invoke

0 comments on commit 8ba4ec0

Please sign in to comment.
Something went wrong with that request. Please try again.