def getPercent(current, maximum):
    if maximum == 0:
        percentdone = -1
    elif current < 0:
        percentdone = -1
    elif current > maximum:
        percentdone = -1
    elif current == maximum:
        percentdone = 100
    else:
        percentdone = int(float(current)/float(maximum)*100)
    return percentdone
Celery task decorator. Forces the task to have only one running instance at a time.
dataset/ETHPy150Open munki/munki/code/client/munkilib/adobeutils.py/getPercent--crossover with--dataset/ETHPy150Open Robpol86/Flask-Celery-Helper/flask_celery.py/single_instance