|
@@ -657,10 +657,9 @@ def testDetect(request):
|
|
def testDetectApns(request):
|
|
def testDetectApns(request):
|
|
logger = logging.getLogger('info')
|
|
logger = logging.getLogger('info')
|
|
logger.info("进来do_apns函数了")
|
|
logger.info("进来do_apns函数了")
|
|
- logger.info(os.path.join(BASE_DIR, APNS_CONFIG['com.ansjer.customizede']['pem_path']))
|
|
|
|
try:
|
|
try:
|
|
cli = apns2.APNSClient(mode=APNS_MODE,
|
|
cli = apns2.APNSClient(mode=APNS_MODE,
|
|
- client_cert=os.path.join(BASE_DIR, APNS_CONFIG['com.ansjer.customizede']['pem_path']))
|
|
|
|
|
|
+ client_cert=os.path.join(BASE_DIR, 'AnsjerPush/file/apns_pem/customizede.pem'))
|
|
|
|
|
|
push_data = {"alert": "Motion ", "event_time": int(time.time()), "event_type": 1, "msg": "",
|
|
push_data = {"alert": "Motion ", "event_time": int(time.time()), "event_type": 1, "msg": "",
|
|
"received_at": int(time.time()), "sound": "sound.aif", "uid": 111, "zpush": "1", "channel": 1}
|
|
"received_at": int(time.time()), "sound": "sound.aif", "uid": 111, "zpush": "1", "channel": 1}
|