Comment 2 for bug 750984

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 750984] [NEW] 401 "this nonce has been used already" error from api

There's no code to retry requests in lp:kanban. I don't think there
is any in lazr.restful.

The relevant code is

def get_person_directly_assigned_bugs(launchpad, person):
    """Generator yields L{Bug}s assigned to C{person}.

    @param launchpad: A C{Launchpad} instance.
    @param person: A C{person} instance from Launchpad.
    """
    for bug_task in person.searchTasks(status=RELEVANT_STATUSES,
                                       assignee=person):
        # It's nice to see fixed bugs for the sake of a sense of
        # accomplishment, but we don't want the kanban to get too big.
        trace(bug_task)
        if (bug_task.status == "Fix Released"):
            date_closed = bug_task.date_closed
            age = datetime.now(date_closed.tzinfo) - date_closed
            if (age > timedelta(days=31)):
                trace("fixed too long ago, omitting")
                continue
        yield _create_bug(bug_task)