Skip to content

Commit

Permalink
add some extra logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Androz2091 committed Mar 15, 2024
1 parent 0e696df commit cd366e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ def read_analytics_file(package_status_id, package_id, link, session):
read_channel_times.append(read_time_diff)
read_time_start = time.time()
messages = orjson.loads(message_content.read())
print(f'Channel {channel_id} has {len(messages)} messages')
read_time_diff = time.time() - read_time_start
read_csv_times.append(read_time_diff)
compute_time_start = time.time()
Expand Down Expand Up @@ -447,6 +448,7 @@ def read_analytics_file(package_status_id, package_id, link, session):
'total_message_count': len(messages),
'first_10_messages': list(filter(lambda message: 'Content' in message, messages))[:10]
})
print(f'Channel messages data: {time.time() - start}')
compute_2_time_diff = time.time() - compute_2_time_start
compute_2_times.append(compute_2_time_diff)
compute_time_diff = time.time() - compute_time_start
Expand Down

0 comments on commit cd366e8

Please sign in to comment.