Skip to content

chore: Use repeatOnLifecycle for lifecycle-aware coroutine launch#3952

Merged
jamesarich merged 1 commit into
mainfrom
fix/node-repo-deprecation
Dec 10, 2025
Merged

chore: Use repeatOnLifecycle for lifecycle-aware coroutine launch#3952
jamesarich merged 1 commit into
mainfrom
fix/node-repo-deprecation

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

This commit updates the NodeRepository to use repeatOnLifecycle instead of the deprecated launchWhenCreated. This ensures that the coroutine for backfilling denormalized node names is launched when the lifecycle is at least CREATED and is automatically cancelled when the lifecycle is DESTROYED, preventing potential resource leaks.

This commit updates the `NodeRepository` to use `repeatOnLifecycle` instead of the deprecated `launchWhenCreated`. This ensures that the coroutine for backfilling denormalized node names is launched when the lifecycle is at least `CREATED` and is automatically cancelled when the lifecycle is `DESTROYED`, preventing potential resource leaks.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
@github-actions github-actions Bot added repo Repository maintenance bugfix PR tag labels Dec 10, 2025
@jamesarich jamesarich enabled auto-merge December 10, 2025 16:08
@codecov

codecov Bot commented Dec 10, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.52%. Comparing base (44632d0) to head (8e18223).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../meshtastic/core/data/repository/NodeRepository.kt 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #3952      +/-   ##
========================================
- Coverage   0.52%   0.52%   -0.01%     
========================================
  Files        394     394              
  Lines      23161   23162       +1     
  Branches    2939    2939              
========================================
  Hits         122     122              
- Misses     23018   23019       +1     
  Partials      21      21              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamesarich jamesarich added this pull request to the merge queue Dec 10, 2025
Merged via the queue into main with commit 34225cd Dec 10, 2025
8 checks passed
@jamesarich jamesarich deleted the fix/node-repo-deprecation branch December 10, 2025 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag repo Repository maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant