Closed igorsimb closed 5 months ago
[!WARNING]
Rate Limit Exceeded
@igorsimb has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 17 minutes and 29 seconds before requesting another review.
How to resolve this issue?
After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. We recommend that you space out your commits to avoid hitting the rate limit.How do rate limits work?
CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our [FAQ](https://coderabbit.ai/docs/faq) for further information.Commits
Files that changed from the base of the PR and between 4539e6c45a5d5d507b0cb88cc14f5f61d4ed7048 and f6674fabf458303ac0ac3ea7e7d9fe55e8b259e6.
The changes in this update focus on enhancing item scheduling and updating functionalities within the application. These changes aim to improve the efficiency of managing scraping intervals for items, introduce new features for activating parsing on selected items, and handle errors more effectively during these operations.
File(s) | Summary |
---|---|
main/utils.py , main/views.py |
- Added a new function uncheck_all_boxes in main/utils.py to uncheck all boxes on the item list page and update the items list accordingly.- Added activate_parsing_for_selected_items in main/utils.py to set is_parser_active for specified items.- Updated create_scrape_interval_task in main/views.py to handle a new form field period and include error handling.- Added update_scrape_interval function in main/views.py for interval updates. |
tests/factories.py , tests/main/test_main_utils.py , tests/main/test_main_views.py |
- Included imports for PeriodicTask and IntervalSchedule in tests/factories.py .- Added ItemFactory in tests/factories.py for creating Item model instances.- Added tests for activating parsing on selected items in tests/main/test_main_utils.py .- Added tests for update_scrape_interval function and related functionalities in tests/main/test_main_views.py .- Modified existing tests for better coverage in tests/main/test_main_views.py . |
Objective | Addressed | Explanation |
---|---|---|
Interval update should keep the schedule | ✅ |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Fixes https://github.com/igorsimb/mp-monitor/issues/102
If there is an existing schedule running, user can now check desired checkboxes and click Update Interval to add/remove items from the schedule without creating a new one.
Summary by CodeRabbit
create_scrape_interval_task
function to handle a new form field and include error handling for IntegrityError.update_scrape_interval
function to update the scrape interval and activate scraping for selected items, with error handling and form rendering logic.