bug fix
This commit is contained in:
parent
721d2fc5bb
commit
e6fd9c6b00
1 changed files with 2 additions and 1 deletions
|
|
@ -465,8 +465,9 @@ def toot_context_should_be_fetched(toot):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
lastSeen = recently_checked_context[toot['uri']]['lastSeen']
|
lastSeen = recently_checked_context[toot['uri']]['lastSeen']
|
||||||
|
createdAt = recently_checked_context[toot['uri']]['created_at']
|
||||||
lastSeenInSeconds = (datetime.now(lastSeen.tzinfo) - lastSeen).total_seconds()
|
lastSeenInSeconds = (datetime.now(lastSeen.tzinfo) - lastSeen).total_seconds()
|
||||||
ageInSeconds = (datetime.now(lastSeen.tzinfo) - recently_checked_context[toot['uri']]['created_at']).total_seconds()
|
ageInSeconds = (datetime.now(createdAt.tzinfo) - createdAt).total_seconds()
|
||||||
if(ageInSeconds <= 60 * 60):
|
if(ageInSeconds <= 60 * 60):
|
||||||
# For the first hour: allow refetching context as desired
|
# For the first hour: allow refetching context as desired
|
||||||
return True
|
return True
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue