-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add mechanism to remove deprecated WorkManager jobs #805
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
Conversation
CDRussell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's now some duplicate code left over in NotificationScheduler
- it still also tries to cancel unnecessary work
- it also defines deprecated work tag list
app/src/androidTest/java/com/duckduckgo/app/job/JobCleanerTest.kt
Outdated
Show resolved
Hide resolved
|
@CDRussell I've changed how the |
| val requestBuilder = OneTimeWorkRequestBuilder<TestWorker>() | ||
| val request = requestBuilder | ||
| .addTag(it) | ||
| .setInitialDelay(10, TimeUnit.SECONDS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we set this delay because if we don't the Worker will be immediately completed.
CDRussell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, and i never knew about that worker testing lib so excited to see its inclusion.
Some minor tidy-up suggestions. Feel free to merge after (no re-reviewing needed)
- Remove sticky search comment from
JobCleaner - Format
JobCleanerclass - Format
JobCleanerTestclass
Great stuff! 👍
Heads up that this comment hasn't been addressed |
Task/Issue URL: https://app.asana.com/0/414730916066338/1173445999500153/f
Description:
Our current implementation has
AndroidNotificationSchedulercleaning up old jobs AND scheduling new work. The idea in this PR is to separate the responsibilities making it more readable.Internal references:
Software Engineering Expectations
Technical Design Template