Changeset 12584 for main


Ignore:
Timestamp:
10 Feb 2015, 14:34:55 (10 years ago)
Author:
uli
Message:

Check system load when creating reports.

File:
1 edited

Legend:

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

    r9680 r12584  
    113113
    114114    def update(self, START_GENERATOR=None, generator=None):
     115        utils = queryUtility(IKofaUtils)
     116        if not utils.expensive_actions_allowed():
     117            self.flash(_(
     118                "Currently, new reports cannot be created due to high "
     119                "system load. Please try again later."), type='danger')
     120            self.redirect(self.url(self.context))
     121            return
    115122        self.creators = self.get_creators()
    116123        self.generator_names = [x[1] for x in self.creators]
Note: See TracChangeset for help on using the changeset viewer.