@app.route('<STR_LIT>', methods=['<STR_LIT:GET>'])<EOL>def consume(consumer_id):
global _consumers<EOL>consumer = _consumers[consumer_id]<EOL>client = get_docker_client()<EOL>try:<EOL><INDENT>status = client.inspect_container(consumer.container_id)['<STR_LIT>']['<STR_LIT>']<EOL><DEDENT>except Exception as e:<EOL><INDENT>status = '<STR_LIT>'<EOL><DEDENT>new_logs = client.logs(consumer.container_id,<EOL>stdout=True,<EOL>stderr=True,<EOL>stream=False,<EOL>timestamps=False,<EOL>since=calendar.timegm(consumer.offset.timetuple()))<EOL>updated_consumer = Consumer(consumer.container_id, datetime.utcnow())<EOL>_consumers[str(consumer_id)] = updated_consumer<EOL>response = jsonify({'<STR_LIT>': new_logs, '<STR_LIT:status>': status})<EOL>response.headers['<STR_LIT>'] = '<STR_LIT:*>'<EOL>response.headers['<STR_LIT>'] = '<STR_LIT>'<EOL>return response<EOL>
Given an existing consumer ID, return any new lines from the
    log since the last time the consumer was consumed.