19 Commits

Author SHA1 Message Date
Fabian Weisshaar
fe1c697631 fix pep8, fix argparse 2018-01-30 12:37:12 +01:00
Fabian Weisshaar
2b5f0e9f05 update BaseCommand option_list for Django 1.11 2018-01-30 12:37:12 +01:00
Thomas Waldmann
fb84008b74 fix pep8 issue, disable one pep8 warning 2015-06-04 12:47:11 +02:00
Thomas Waldmann
0f2e0235cb "faults" management command: use atomic transaction PER HOST
This was an atomic transaction per ALL hosts (IIRC introduced in the hope of better speed).
But a frequently occurring problem was that it processed SOME hosts, then ran into a
database locked error and then it rolled back all the changes and aborted processing for all hosts.

This led to the strange behaviour that users got emails about abuse flag being set, but it wasn't set.
And also other stuff behaved wrong, like fault counters.

Now, the atomic transaction is per host, so a host is either processed completely and correctly or rolled back.
If an exception happens, the roll back occurs, the traceback is logged and we just continue with next host.
2015-06-04 12:06:21 +02:00
Thomas Waldmann
58aae90b0a management commands sending emails: translate texts for the email recipient 2014-11-28 00:31:22 +01:00
Thomas Waldmann
ae61712fbc management commands sending emails: mark strings as translatable 2014-11-27 22:55:10 +01:00
Thomas Waldmann
dd95d84404 remove deprecated commit_on_success (works for Django >= 1.6), update requirements to Django 1.6.7 2014-09-26 02:32:46 +02:00
Thomas Waldmann
6554f9f1bf abuse email msg text: make a constant from it 2014-09-02 23:57:06 +02:00
Thomas Waldmann
1f03834463 fix wrong cmdline option default for --reset-available
the value of reset_available option tells whether to do the reset (True) or not (False).
it has nothing to do with the value being written to h.available when the reset is executed.
2014-08-17 00:49:55 +02:00
Thomas Waldmann
7c1b260d3b reformat / improve notification email text 2014-08-17 00:36:29 +02:00
Thomas Waldmann
df204d8ccf add notifications by email when a host gets flagged as abusive 2014-08-17 00:18:01 +02:00
Thomas Waldmann
cafaeeb64e use 1 transaction for the whole faults command db update
hopefully this is much faster than the default behaviour which does 1 transaction per save(),
so the database is not locked such a long time.
2014-05-29 20:42:29 +02:00
Thomas Waldmann
3d53d8f1fd fix faults command help strings 2013-12-18 03:18:35 +01:00
Thomas Waldmann
14b9407ab5 remove unused imports 2013-12-15 18:27:59 +01:00
Thomas Waldmann
0df4efce1c add/fix some module-level docstrings 2013-12-15 17:09:22 +01:00
Thomas Waldmann
2c5e756f15 add --flag-abuse, add some docs about abuse handling 2013-12-01 12:17:10 +01:00
Thomas Waldmann
866ddf3bea add available, abuse and abuse_blocked flags to Host, show on UI, script to reset flags
there is an issue with south and sqlite - it doesn't handle migrations that add BooleanField columns with defaults.
just use the faults script to set the flags to their correct default after migrating with south.
2013-11-30 12:32:03 +01:00
Thomas Waldmann
47724a3d6b pep8 fixes 2013-11-30 10:10:11 +01:00
Thomas Waldmann
9970e76bb5 faults managment script: show and reset client/server fault counters 2013-11-30 08:49:53 +01:00