ANIALLATOR114 / SimplyTransport

SimplyTransport - API - Website - Ingesting and presenting Transport Information
https://simplytransport.ie
Apache License 2.0
2 stars 3 forks source link

Add logs to delays job #141

Closed ANIALLATOR114 closed 3 days ago

ANIALLATOR114 commented 3 days ago

Summary by Sourcery

Enhance the delays service by adding logging to track the progress and state of schedule processing, including the number of schedules fetched, processed, and filtered.

Enhancements:

sourcery-ai[bot] commented 3 days ago

Reviewer's Guide by Sourcery

This pull request adds logging statements to the record_all_delays method in the delays_service.py file. The changes focus on improving the observability of the delays job by adding informative log messages at key points in the process.

No sequence diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Added logging statements to track the progress and results of the delays job
  • Added log for chunk processing progress
  • Added log for fetching schedules with day and time range
  • Added log for the number of schedules found
  • Added log for the number of schedules after removing exceptions and inactive calendars
  • Added log for the number of realtime schedules retrieved
  • Added logs for the number of realtime schedules before and after filtering
SimplyTransport/timescale/services/delays_service.py

Tips and commands #### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on the pull request. - **Continue discussions:** Reply directly to Sourcery's review comments. - **Generate a GitHub issue from a review comment:** Ask Sourcery to create an issue from a review comment by replying to it. #### Customizing Your Experience Access your [dashboard](https://app.sourcery.ai) to: - Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others. - Change the review language. - Add, remove or edit custom review instructions. - Adjust other review settings. #### Getting Help - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).