def wrapper(*args, **kwargs): time.sleep(5) # wait for opertaor instance start new_application(app_name=name, fields=fields, s3_buckets=s3_buckets) func(*args, **kwargs) delete_application(name)
def new_application_api(name): args = reqparse.RequestParser(). \ add_argument("fields", type=dict, required=True). \ add_argument("s3Buckets", type=str, required=True). \ parse_args() args = from_view_dict(args) args['name'] = name return new_application(**args)
def create(self, data): new_application(data['name'], data['fields'], data['s3_buckets'])
def wrapper(*args, **kwargs): new_application(app_name=name, fields=fields, s3_bucket=s3_buckets) func(*args, **kwargs) delete_application(name, True)