Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
bug 1122658 - extend KumaJob for IPBanJob
Browse files Browse the repository at this point in the history
  • Loading branch information
groovecoder committed Mar 18, 2015
1 parent 3bce0a2 commit 705315b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions kuma/core/jobs.py
Expand Up @@ -20,7 +20,7 @@ def hash(self, value):
return hashlib.md5(six.b(':').join(value)).hexdigest()


class IPBanJob(Job):
class IPBanJob(KumaJob):
lifetime = 60 * 60 * 3
refresh_timeout = 60

Expand All @@ -30,10 +30,5 @@ def fetch(self, ip):
return "0/s"
return "60/m"

def key(self, ip):
# override the default way to make sure we handle unicode,
# bytestring and integer versions of the pk the same
return 'kuma:core:ipban:%s' % ip

def empty(self):
return []

0 comments on commit 705315b

Please sign in to comment.