Skip to content

Commit

Permalink
Merge pull request #105 from tripleee/slow-down-adjacent
Browse files Browse the repository at this point in the history
Require properly adjacent Sloshy messages for optimized room scanning
  • Loading branch information
tripleee authored Jun 11, 2024
2 parents 015d750 + a70df55 commit 78029f1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions scrape_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ def usercount(
else:
logging.debug("Delta %s", sloshy_delta)
next_sloshy_msg = message
else:
next_sloshy_msg = None

if userid not in users:
logging.debug("room %i: found user %i", room, userid)
Expand Down
12 changes: 7 additions & 5 deletions sloshy.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,11 +798,13 @@ def main():

args = parser.parse_args()

logging.basicConfig(level={
"debug": logging.DEBUG,
"info": logging.INFO,
"warn": logging.WARNING,
"error": logging.ERROR
logging.basicConfig(
format='%(module)s:%(asctime)s:%(levelname)s:%(message)s',
level={
"debug": logging.DEBUG,
"info": logging.INFO,
"warn": logging.WARNING,
"error": logging.ERROR
}[args.loglevel])

if args.migrate:
Expand Down

0 comments on commit 78029f1

Please sign in to comment.