Projet

Général

Profil

0001-PaymentBackend-skip-poll-faster-if-there-is-no-trans.patch

Pierre Ducroquet, 22 juin 2022 13:59

Télécharger (894 octets)

Voir les différences:

Subject: [PATCH] PaymentBackend: skip poll faster if there is no transaction
 (#66487)

 combo/apps/lingo/models.py | 3 +++
 1 file changed, 3 insertions(+)
combo/apps/lingo/models.py
258 258
            status__in=Transaction.RUNNING_STATUSES,
259 259
        ).order_by('pk')
260 260
        last_pk = -1
261
        # skip fast in order to save some resources on database
262
        if not transactions.exists():
263
            return
261 264
        while True:
262 265
            # lock each transaction before trying to poll it
263 266
            with atomic():
264
-