Created
February 20, 2019 05:43
-
-
Save mwacc/bbc1bbe7153c8130469cef97191e1d21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from aws_xray_sdk.core import xray_recorder | |
##HIDE @xray_recorder.capture('transfer_funds') | |
def money_transfer(from_acc_id, to_acc_id, value): | |
##HIDE xray_recorder.begin_subsegment('lock_funds') | |
money_locked = enough_and_lock(from_acc_id, value) | |
##HIDE xray_recorder.end_subsegment() | |
if money_locked: | |
##HIDE xray_recorder.begin_subsegment('transfer funds via ' + money_locked.payment_gateway) | |
transfer_funds(from_acc_id, to_acc_id, value) | |
##HIDE xray_recorder.end_subsegment() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment