We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 032cc03 commit 1939d75Copy full SHA for 1939d75
spotbot.py
@@ -50,8 +50,8 @@ def is_entity_recent(entity):
50
return False
51
ent_time = entity.metadata['timestamp']
52
cur_time = datetime.datetime.now(datetime.timezone.utc)
53
- two_hours_in_seconds = 60 * 60 * 2
54
- return (cur_time - ent_time).total_seconds() < two_hours_in_seconds
+ lookback_seconds = os.getenv('LOOKBACK_SECONDS', 7200)
+ return (cur_time - ent_time).total_seconds() < lookback_seconds
55
56
def call_target(content, messageId=None):
57
target_url = os.getenv('TARGET_URL')
0 commit comments