try again
This commit is contained in:
parent
e6fd9c6b00
commit
1c7023819e
1 changed files with 5 additions and 0 deletions
|
|
@ -466,6 +466,11 @@ def toot_context_should_be_fetched(toot):
|
||||||
else:
|
else:
|
||||||
lastSeen = recently_checked_context[toot['uri']]['lastSeen']
|
lastSeen = recently_checked_context[toot['uri']]['lastSeen']
|
||||||
createdAt = recently_checked_context[toot['uri']]['created_at']
|
createdAt = recently_checked_context[toot['uri']]['created_at']
|
||||||
|
|
||||||
|
# convert to date time, if needed
|
||||||
|
if isinstance(createdAt, str):
|
||||||
|
createdAt = parser.parse(createdAt)
|
||||||
|
|
||||||
lastSeenInSeconds = (datetime.now(lastSeen.tzinfo) - lastSeen).total_seconds()
|
lastSeenInSeconds = (datetime.now(lastSeen.tzinfo) - lastSeen).total_seconds()
|
||||||
ageInSeconds = (datetime.now(createdAt.tzinfo) - createdAt).total_seconds()
|
ageInSeconds = (datetime.now(createdAt.tzinfo) - createdAt).total_seconds()
|
||||||
if(ageInSeconds <= 60 * 60):
|
if(ageInSeconds <= 60 * 60):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue