Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add rate limiting for task updates#35

Merged
snopoke merged 4 commits intomaintaskbadger/taskbadger-python:mainfrom
sk/update-intervalstaskbadger/taskbadger-python:sk/update-intervalsCopy head branch name to clipboard
Mar 3, 2025
Merged

Add rate limiting for task updates#35
snopoke merged 4 commits intomaintaskbadger/taskbadger-python:mainfrom
sk/update-intervalstaskbadger/taskbadger-python:sk/update-intervalsCopy head branch name to clipboard

Conversation

@snopoke
Copy link
Collaborator

@snopoke snopoke commented Mar 3, 2025

Summary

  • Add rate limiting capabilities for task progress updates based on time and value intervals
  • Allow specifying minimum ping intervals to reduce update frequency
  • Optimize API usage by preventing unnecessary updates
  • Fix datetime deprecation warnings

Test plan

  • Added comprehensive tests for time and value interval checks
  • Verified both progress update methods respect interval settings
  • Confirmed ping intervals work correctly with the time-based checks

🤖 Generated with Claude Code

@snopoke snopoke requested a review from Copilot March 3, 2025 15:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR adds rate limiting capabilities to task updates by introducing time‐ and value‐based interval checks along with configurable ping intervals to optimize API usage and reduce unnecessary updates.

  • Added tests for rate limiting using time and value intervals as well as combined checks.
  • Updated the Task API methods (increment_progress, update_progress, ping) to respect new interval parameters.
  • Revised test utilities to use full datetime import for consistency.

Reviewed Changes

File Description
tests/test_sdk.py Added tests for new rate limiting functionality on task updates.
taskbadger/sdk.py Updated task update methods to include configurable intervals.
tests/utils.py Modified datetime usage to match the new import style.

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

taskbadger/sdk.py Outdated Show resolved Hide resolved
tests/utils.py Outdated Show resolved Hide resolved
@snopoke snopoke merged commit 0337e12 into main Mar 3, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.