summaryrefslogtreecommitdiff
path: root/Mailman/SecurityManager.py
diff options
context:
space:
mode:
authorbwarsaw2001-06-28 04:16:41 +0000
committerbwarsaw2001-06-28 04:16:41 +0000
commit143d8a95184fe497d9a394ab27ba9155506fb134 (patch)
treee8aecf74444c7103eb59fab3fd344515340603e0 /Mailman/SecurityManager.py
parenta66ea550e7dc77e705ff7bfe5e7f4a90661cc218 (diff)
downloadmailman-143d8a95184fe497d9a394ab27ba9155506fb134.tar.gz
mailman-143d8a95184fe497d9a394ab27ba9155506fb134.tar.zst
mailman-143d8a95184fe497d9a394ab27ba9155506fb134.zip
Several changes which allow subclasses to do some calculation for each
file processed. This would allow for example, a throttling algorithm which limited the number of files processed per time period, or when load averages were too high. Specifically, run(): Allow __oneloop() to return any false value, not just zero, to trigger the snooze alarm. __oneloop(): After each file is processed, call _shortcircuit() and break out of the file loop if that returns a true value. This way, _shortcircuit() is executed for each file processed, and gives subclasses a chance to do some per-file calculation. _doperiodic() is at a finer granularity, since it conflates per-file and per-processing-loop calculations. _cleanup(), _dispose(), _doperiodic(), _snooze(), _shortcircuit(): Add docstrings describing their interface. _shortcircuit(): Default is to return 0, meaning don't shortcircuit.
Diffstat (limited to 'Mailman/SecurityManager.py')
0 files changed, 0 insertions, 0 deletions