[hg] galaxy 2741: Removed print stmts in listener
details: http://www.bx.psu.edu/hg/galaxy/rev/2f2c07fa1a39 changeset: 2741:2f2c07fa1a39 user: rc date: Mon Sep 21 15:40:58 2009 -0400 description: Removed print stmts in listener 1 file(s) affected in this change: scripts/galaxy_messaging/amqp_consumer.py diffs (43 lines): diff -r df1f5b739a53 -r 2f2c07fa1a39 scripts/galaxy_messaging/amqp_consumer.py --- a/scripts/galaxy_messaging/amqp_consumer.py Mon Sep 21 14:45:56 2009 -0400 +++ b/scripts/galaxy_messaging/amqp_consumer.py Mon Sep 21 15:40:58 2009 -0400 @@ -26,6 +26,10 @@ from amqplib import client_0_8 as amqp +import logging +logging.basicConfig(level=logging.DEBUG) +log = logging.getLogger( 'GalaxyAMQP' ) + galaxy_config_file = 'universe_wsgi.ini' global dbconnstr @@ -42,16 +46,16 @@ return rc def recv_callback(msg): - #print 'Received: ' + msg.body + ' from channel #' + str(msg.channel.channel_id) dom = xml.dom.minidom.parseString(msg.body) barcode = get_value(dom, 'barcode') state = get_value(dom, 'state') - print barcode, state + log.debug('Barcode: '+barcode) + log.debug('State: '+state) # update the galaxy db galaxy = GalaxyDbInterface(dbconnstr) sample_id = galaxy.get_sample_id(field_name='bar_code', value=barcode) if sample_id == -1: - print 'Invalid barcode.' + log.debug('Invalid barcode.') return galaxy.change_state(sample_id, state) @@ -63,7 +67,7 @@ amqp_config = {} for option in config.options("galaxy:amqp"): amqp_config[option] = config.get("galaxy:amqp", option) - print amqp_config + log.debug(str(amqp_config)) conn = amqp.Connection(host=amqp_config['host']+":"+amqp_config['port'], userid=amqp_config['userid'], password=amqp_config['password'],
participants (1)
-
Nate Coraor