def mash(key): try: logger.debug('/mash/{0}'.format(key)) mash = rdb_client.get('mashes', key) mash_model = MashMessage(mash['id'], mash['key'], mash['song1'], mash['song2'], mash['status']) return render_template('mash.html', mash=mash_model) except Exception, err: logger.exception('Something bad happened: mash, key={0}'.format(key))
def resubmit(key): try: mash = rdb_client.get('mashes', key) mash_model = MashMessage(mash['id'], mash['key'], mash['song1'], mash['song2'], mash['status']) logger.debug('resubmit mash:{0}'.format(mash_model)) socket.send_json(convert_mash_to_zeromq_message(mash_model)) return redirect(url_for('mash', key=mash_model.key)) except Exception, err: logger.exception('Something bad happened: resubmit, key={0}'.format(key))