mirror of
https://github.com/lalanza808/monero.fail.git
synced 2025-08-19 21:07:56 -04:00
add pruning to crawled peers and change colors on map
This commit is contained in:
parent
1a6374afb9
commit
b88bd19578
3 changed files with 74 additions and 48 deletions
|
|
@ -35,6 +35,11 @@ class Peer(Model):
|
|||
lon = FloatField(null=True)
|
||||
datetime = DateTimeField(default=datetime.utcnow)
|
||||
|
||||
def hours_elapsed(self):
|
||||
now = datetime.utcnow()
|
||||
diff = now - self.datetime
|
||||
return diff.total_seconds() / 60 / 60
|
||||
|
||||
def get_ip(self):
|
||||
return urlparse(self.url).hostname
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue