Changeset 12587


Ignore:
Timestamp:
11 Feb 2015, 06:23:46 (10 years ago)
Author:
Henrik Bettermann
Message:

Send email to system admin if limits are exceeded for the first time. This method can be configured in custom packages.

File:
1 edited

Legend:

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

    r12564 r12587  
    313313        return payment.p_item
    314314
     315    def _systemLoadWarning(self):
     316        """Send email to system admin if limits are exceeded for the first time.
     317
     318        To be configured in custom packages.
     319        """
     320        return
     321
    315322    def expensive_actions_allowed(self, type=None, request=None):
    316323        """Tell, whether expensive actions are currently allowed.
     
    337344                    max_val = 100.0 + max_val
    338345                if mem_val.percent > max_val:
     346                    self._systemLoadWarning()
    339347                    return False
    340348            else:
     
    343351                    max_val = mem_val.total + max_val
    344352                if mem_val.used > max_val:
     353                    self._systemLoadWarning()
    345354                    return False
    346355        return True
Note: See TracChangeset for help on using the changeset viewer.