- # r.publish(sub_data['subscriptionId'], json.dumps({
- # 'consumerSubscriptionId': sub_data['consumerSubscriptionId'],
- # 'notificationEventType': msg.notificationEventType,
- # 'objectRef': msg.objectRef
- # }))
- # try:
- # headers = {'User-Agent': 'Mozilla/5.0'}
- # resp = requests.post(sub_data['callback'], data=callback_data,
- # headers=headers)
- # if resp.status_code == 202 or resp.status_code == 200:
- # logger.info('Notify to SMO successed')
- # return
- # logger.error('Response code is: {}'.format(resp.status_code))
- # except requests.exceptions.HTTPError as err:
- # logger.error('request smo error: {}'.format(err))