Replace new job with previous job with same JOB_TAG
Is it possible to override the previous job by the new job? I'm using this library to sync data stored in offline with my server. The problem arises when I make a cron for syncing. It reflects duplicate data on the server. For the sake of uniqueness, I'm giving job tag as "XYZ job_unique id". So is there any way to replace the new job with duplicate job tag?
Thanks in advance.
Curreo there is no way to delete a job by id. If you are interested in adding that functionality as a pull request that would be fine. You can see how it would be done looking at the following section of code.
Make a new public method similar to queue.flushQueue() but have the method accept a job id and delete on id.
https://github.com/billmalarky/react-native-queue/blob/master/Models/Queue.js
If you add the functionality and pull request it I'll merge it in relatively quickly.
On Sat, Jun 16, 2018, 1:41 PM Harsh Kapadia [email protected] wrote:
Is it possible to override the previous job by the new job? I'm using this library to sync data stored in offline with my server. The problem arises when I make a cron for syncing. It reflects duplicate data on the server. For the sake of uniqueness, I'm giving job tag as "XYZ job_unique id". So is there any way to replace the new job with duplicate job tag?
Thanks in advance.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/billmalarky/react-native-queue/issues/25, or mute the thread https://github.com/notifications/unsubscribe-auth/ABxTU2HtCtYDLoVGNrcKvSlOJKgmuUayks5t9UM3gaJpZM4Uqjn8 .