def monitor()

in bulkprovision/test.py [0:0]


def monitor():
    count = 1
    
    while count > 0:
        count = 0
        cleanup_handler({"status":["FAILED","TERMINATED"],"dytable":DYANMO_TABLE, "region":DEFAULT_REGION}, None)

        # uncomment the line below to override the SSM parameter values for product and provisioning artifact IDs
        provision_handler({"dytable":DYANMO_TABLE, "region":DEFAULT_REGION,
        #"scproductid":PRODUCT_ID,"scpaid":PROVISIONINGA_ART_ID,
        "scparams":SC_TEMPLATE_PARAMETER_NAMES, 
        "tags":[ {"Key":"auto_provision","Value":"SUCCESS"}] } ,None)
        
        resp= monitor_handler({"dytable":DYANMO_TABLE,"status":["PROVISIONING","TERMINATING"], "region":DEFAULT_REGION },None)
        count += resp["statusCount"]
        resp= failure_handler({"dytable":DYANMO_TABLE,"status":["TERMINATING-FAILURE","STATUS-ERROR","PRODUCT-ERROR","PROVISION-ERROR"],"retrythreshold":RETRY, "region":DEFAULT_REGION },None)
        count += resp["statusCount"]
        
        print("waiting...")
        time.sleep(15)