Closed Grohden closed 5 years ago
At this time, no, there is not a migration feature. There also may never be.
I have thought about this issue before and decided that a migration feature would be too complex of a solution to solve the problem.
The problem is that after you change a class's name, the tag's name is now changed and Wendy can no longer run those tasks.
The solution that I felt was the best way to solve the problem is instead of using: val TAG: String = Clazz::class.java.simpleName
as the tag, use a String: val TAG: String = "Clazz"
. So if you ever change the name of Clazz
, nothing is broken.
Thank you for the message so I can update the docs. I have been using strings in my own apps these days anyway. I like to use a description like: "Update users profile photo" as the tag. I feel that it is more universal then UploadProfilePhotoPendingTask::class.java.simpleName
.
I do not see a way to remove the need for tags at this time so the best way we can solve this problem is with best practices and docs. That would be a great way to fix this.
Would you like to update the README and send a pull request? Feel free!
@levibostian i understand, i just opened this because of the need to document it, if you release an app and rename a tag you would have some problems to fix that... but wendy error message at least make it easy to find the error <3
I'll try to make a PR, it will take some weeks till i get some time for that. Also, your suggestion to use a string should be in best practices...
Note: I'm kind of annoyed that the README
syntax highlight is not configured for Kotlin, I'll fix that too
@Grohden I agree with everything you stated.
Thanks for creating the issue. This is a fix that needs to be done.
When a wendy task is created the
tag
is saved as astring
, normally you use something likeBut if you rename the class all current pending tasks break.. forcing you to ~cry~ clear the app data. is there any way to solve that now with wendy api? Also, this should be warned in the docs. Note: i'm using
0.2.1-alpha