Ignore:
Timestamp:
19 Jan 2024, 00:28:47 (10 months ago)
Author:
Henrik Bettermann
Message:

Commit transaction after 1000 students have been created.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py

    r17674 r17677  
    773773        if isinstance(self.context, ApplicantsContainer):
    774774            container_only = True
     775        n = 0
    775776        for result in results:
     777            n += 1
    776778            if container_only and result.__parent__ is not self.context:
    777779                continue
     
    782784                failed.append(
    783785                    (result.applicant_id, self.url(result, 'manage'), msg))
     786            if not n % 1000:
     787                transaction.commit()
    784788        grok.getSite()['configuration'].maintmode_enabled_by = None
    785789        self.successful = ', '.join(created)
Note: See TracChangeset for help on using the changeset viewer.