Skip to content

Commit

Permalink
Merge f1a5e14 into f6fbacf
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoNet committed Aug 12, 2015
2 parents f6fbacf + f1a5e14 commit ee220b4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dataserv/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,16 @@ def online():
# that status of the farmers connected to the node
output = ""
current_time = datetime.datetime.utcnow()
total_height = 0
text = "{0} | Last Seen: {1} | Height: {2}<br/>"
total_text = "{0} Total Height<br/>"

for farmer in online_farmers():
last_seen = secs_to_mins((current_time - farmer.last_seen).seconds)
text = "{0} | Last Seen: {1} | Height: {2}<br/>"
output += text.format(farmer.btc_addr, last_seen, farmer.height)

total_height += farmer.height

output += total_text.format(total_height)
return output


Expand Down

0 comments on commit ee220b4

Please sign in to comment.