How can i re try a job that has been failed ? ( basically persisting the job and re trying it when app is back online or re opened)
Udit-takkar opened this issue · 5 comments
i have to upload an image to server but if the device looses connection then it should persist the task and then retry it again when app comes back online or app is re started by the user. How can i do this?
You can implement this by using react-native-netinfo to get the connection state. Just configure an onFailure callback which adds the failed job again with startQueue flag set to false and attemts set to 0. Than you just have to call queue.start() if the connection state listener of react-native-netinfo is called.
#37
#31
@SimonErm thanks
You can implement this by using react-native-netinfo to get the connection state. Just configure an onFailure callback which adds the failed job again with startQueue flag set to false and attemts set to 0. Than you just have to call queue.start() if the connection state listener of react-native-netinfo is called. #37 #31
@SimonErm tried this . not working
it goes into infinte loop if request fails even though i am passing flag as false.
Can you provide a code example to reproduce?
I close this because of inactivity