cherrytea-dev / cherrytea-dev/la_searcher_bot

fix metrics in send_notifications

Open
#609 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
12
Forks
4
Avg merge
4d 11h
Merged PRs (30d)
18

Description

```

def _process_logs_with_completed_sending(
time_analytics: TimeAnalytics, message_to_send: MessageToSend, change_log_upd_time: datetime.datetime | None
):
creation_time = message_to_send.created

duration_complete_vs_create_minutes = seconds_between_round_2(creation_time)
logging.info(f'metric: creation to completion time – {duration_complete_vs_create_minutes} min')
time_analytics.delays.append(duration_complete_vs_create_minutes)

duration_complete_vs_parsed_time_minutes = seconds_between_round_2(change_log_upd_time or datetime.datetime.now())
logging.info(f'metric: parsing to completion time – {duration_complete_vs_parsed_time_minutes} min')
time_analytics.parsed_times.append(duration_complete_vs_parsed_time_minutes)

```

`duration_complete_vs_parsed_time_minutes` and `duration_complete_vs_create_minutes` should be in minutes. Now in seconds.

2. remove [s0] from messages.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.