Skip to content

Task improvements #379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 6, 2025
Merged

Task improvements #379

merged 1 commit into from
Mar 6, 2025

Conversation

bjorkert
Copy link
Contributor

@bjorkert bjorkert commented Mar 3, 2025

Improvements

  • Throttled Scheduling:
    Background refresh notifications are now re-scheduled at most once every 10 seconds, preventing intensive calls to this functionality.

  • Device Status Retry:
    When device status returns empty, the system now retries after 5 minutes instead of giving up immediately.

  • Alarm Check Delay:
    Alarm check tasks now wait 5 seconds after .deviceStatus, .treatments, and .fetchBG are complete before re-attempting, avoiding immediate re-triggers.

@bjorkert bjorkert requested a review from marionbarker March 3, 2025 20:39
@marionbarker
Copy link
Collaborator

Code Review

Looks good

Test

Built onto test phone and confirm proper display for URL fed from Loop, Trio 0.2.3 and Trio-dev

  • success: Loop
  • success: Trio 0.2.3
  • success: Trio-dev (private beta)

Observation, the prediction lines take a cycle to show up for both Loop and Trio 0.2.3, but appear immediately for Trio-dev. Not sure if that was always true.

Built onto personal phone as well.

Copy link
Collaborator

@marionbarker marionbarker left a comment

Choose a reason for hiding this comment

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

Approved based on code review and testing.

@marionbarker
Copy link
Collaborator

Test with "problem" URL

Get the URL that stimulated this change (person doesn't have device status data)

  • Build PR 379 version to Mac.
    • Open the URL that was giving the user a problem
    • Confirm it opens properly
  • Build v2.2.10 to Mac and observe high rates of logging:
QUARANTINED DUE TO HIGH LOGGING VOLUME
Type: Fault | Timestamp: 2025-03-06 09:49:19.121711-08:00 | Library: libsystem_trace.dylib | Subsystem: libsystem_trace.dylib | Category: Default | TID: 0x673e951
  • Build v2.2.10 to a real phone and observe LoopFollow crashes for this URL
  • Build PR 379 version to real phone and now LoopFollow opens properly

Observation - restored real phone to my personal Loop URL and notice that the forecast displays promptly this time.

@bjorkert bjorkert merged commit 6382e24 into dev Mar 6, 2025
@bjorkert bjorkert deleted the task-improvements branch March 6, 2025 18:52
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