Chris Pomeroy
2018-03-23 563d4f53886d16ffd7a85304bc2910b31f3fb101
Added retry for the Checkkey function
1 files modified
6 ■■■■■ changed files
aaxConvert.py 6 ●●●●● patch | view | raw | blame | history
aaxConvert.py
@@ -7,6 +7,7 @@
import json
import requests
from querysubsonic import findalbumbyname
from time import sleep
# arguments
@@ -138,11 +139,16 @@
def getcorrectkey(aaxfile):
    hex = filechecksum(aaxfile)
    payload = hex
    recovery = 3
    while recovery != 0:
    r = requests.post('http://x86-docker01:8080/function/checkkey', payload, verify=False, timeout=None)
    if r.status_code == 200:
        key = r.text
          recovery = 0
    else: 
        print('Checkkey function is down please wait')
          recovery = recovery - 1
          sleep(5)
    return key
for rfile in glob.glob(args.filename):