misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
f734c9cd68
commit
eda8a18788
@ -12,7 +12,7 @@ def parse_rfc3339(dt):
|
||||
class Peer(object):
|
||||
def __init__(self, obj):
|
||||
now = time.time()
|
||||
just_met = datetime.now().strftime("%Y-%m-%dT%H:%M:%S")
|
||||
just_met = datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%S")
|
||||
self.first_met = parse_rfc3339(obj.get('met_at', just_met))
|
||||
self.first_seen = parse_rfc3339(obj.get('detected_at', just_met))
|
||||
self.prev_seen = parse_rfc3339(obj.get('prev_seen_at', just_met))
|
||||
|
@ -100,5 +100,6 @@ class AsyncAdvertiser(object):
|
||||
|
||||
except Exception as e:
|
||||
logging.warning("error while polling pwngrid-peer: %s" % e)
|
||||
logging.debug(e, exc_info=True)
|
||||
|
||||
time.sleep(1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user