Skip to content

Commit

Permalink
Merge pull request #14 from tblanarik/tblanarik/cast-bug-fix
Browse files Browse the repository at this point in the history
must cast lookback as int
  • Loading branch information
tblanarik authored Sep 23, 2024
2 parents d90a2ea + 541476a commit ea3681e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spotbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def is_entity_recent(entity):
return False
ent_time = entity.metadata['timestamp']
cur_time = datetime.datetime.now(datetime.timezone.utc)
lookback_seconds = os.getenv('LOOKBACK_SECONDS', 7200)
lookback_seconds = int(os.getenv('LOOKBACK_SECONDS', 7200))
return (cur_time - ent_time).total_seconds() < lookback_seconds

def call_target(content, messageId=None):
Expand Down

0 comments on commit ea3681e

Please sign in to comment.