SimonErm/react-native-job-queue

Room and SQLite are permanently stored question.

k-lpmg opened this issue · 1 comments

As indicated in the README, it has been confirmed that iOS uses SQLite and Android uses Room.

So I have a question.
When a DB Table is created and workers and jobs are added, I wonder if this data is permanently stored even if the app is forcibly closed and run.

It has been confirmed that Queue.instance.registeredWorkers is initialized when the app is re-launched, but I would like to ask a question for confirmation.

The jobs are persisted across app restarts(the workers are just functions which are registered at runtime). If the app is forcibly closed while the job is getting persisted, there is a chance that it won't finish successful. This chance could be reduced by migrating this library to the new rn architecture to avoid the bridge and by using background tasks for persisting, so it could be finished even if the app is forced closed. I currently don't have the time to do it by myself but feel free to open a PR :-)