kstateome / django-cas

K-State's maintained version of django-cas
MIT License
112 stars 83 forks source link

Allow opt out of waiting time for PGT Tickets #45

Closed dstegelman closed 9 years ago

dstegelman commented 9 years ago

Allow user to opt out of this wait loop

pgtIou = None
    retries_left = 5
    while not pgtIou and retries_left:
        try:
            p = PgtIOU.objects.get(tgt=pgt)
            logger.warning('PgtIOU retrieved.')
            return p
        except PgtIOU.DoesNotExist:
            time.sleep(1)
            retries_left -= 1