This repository has been archived by the owner on Oct 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Persistence
To-Do (possibly in separate branch)
|
gaebel
commented
Dec 19, 2022
src/commonMain/kotlin/com/liftric/persisted/queue/JobScheduler.kt
Outdated
Show resolved
Hide resolved
gaebel
changed the title
Feature: Persist jobs as JSON
WIP: Feature: Persist jobs as JSON
Dec 19, 2022
gaebel
changed the title
WIP: Feature: Persist jobs as JSON
Feature: Persist jobs as JSON
Dec 20, 2022
LGTM, the 1 second delay is a bit string though, but I am cool with that :) you could investigate different values as well! |
I guess we should just finalise a first version, use it in our apps and go public. It will naturally evolve over time. We can add the potential improvements as issues to leave them on our radar somehow! |
This reverts commit 835b1a2.
benjohnde
approved these changes
Jan 13, 2023
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.
LGTM!
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Serialization
Seems this can't be achieved elegantly (because of polymorphism and generics). The consumer of the library has to provide the proper serializer for the task via a serializer module. This way custom serializers can also get registered. So basically there's no way to hide kotlinx.serialization from the outside (the outside depends on it).
See https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/polymorphism.md
Persistence
Persists and restores jobs via SharedPreferences/UserDefaults.
Merge after #3