From 4700b44d26fcb5a3e2dbfa94670fa54c78a4d203 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Thu, 21 Nov 2024 21:07:33 -0800 Subject: [PATCH] feat: print timestamp --- bsky-activity.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/bsky-activity.py b/bsky-activity.py index cff8c1c..9faef30 100755 --- a/bsky-activity.py +++ b/bsky-activity.py @@ -75,9 +75,6 @@ async def main(): if collection.startswith(prefix): redis_pipe.incr('dev.edavis.atproto.collection.' + prefix.replace('.', '_')) - repo_did = event['did'] - repo_update_time = datetime.now(timezone.utc) - if collection == 'app.bsky.feed.post': embed = payload['record'].get('embed') if embed is not None and embed.get('$type', ''): @@ -90,10 +87,8 @@ async def main(): op_count += 1 if op_count % 500 == 0: - current_time_ms = datetime.now(timezone.utc).timestamp() event_time_ms = event['time_us'] / 1_000_000 - current_lag = current_time_ms - event_time_ms - sys.stdout.write(f'lag: {current_lag:.2f}\n') + sys.stdout.write(f'timestamp: {event_time_ms}\n') redis_pipe.execute() sys.stdout.flush() -- 2.51.2