optional delay

This commit is contained in:
Steve Waterworth
2018-07-16 16:06:44 +01:00
parent c4a093a4a1
commit fe2e165e79
2 changed files with 5 additions and 1 deletions

View File

@@ -50,6 +50,10 @@ def pay(id):
def queueOrder(order):
app.logger.info('queue order')
# For screenshot demo requirements optionally add in a bit of delay
delay = int(os.getenv('PAYMENT_DELAY_MS', 0))
time.sleep(delay / 1000)
# RabbitMQ is not currently traced automatically
# opentracing tracer is automatically set to Instana tracer
# start a span