Multi-threads for calling Amplify.Storage.uploadFile method without network connected
Discussed in https://github.com/aws-amplify/amplify-android/discussions/2305
Originally posted by waertf February 23, 2023
I have the condition that I need to call Amplify.Storage.uploadFile within the following worker class:
public class UploadImageWork extends ListenableWorker{...}
if I run the upload method in Multi-threads
void upload() { WorkRequest UploadImageWifiOnlyWorkWorkRequest = new OneTimeWorkRequest.Builder(UploadImageWork.class).build(); WorkManager .getInstance(context) .enqueue(UploadImageWifiOnlyWorkWorkRequest); }
ref link
for amplify v2.2.2
- I saw that the amplify use workmanager to schedule the jobs. If the amplify enqueue jobs are over 20 or over 50 number. What will happen?
- as for the upper code, is there a side effect of using enqueue nest work in the main process?
- what is the max not be done job number that can be held by amplify?
for amplify v1.38.0
- as for the upper code, is there a side effect of using enqueue for many works?
- what is the max not be done job number that can be held by amplify?
Thanks.
Moving Discussion question to issues.
the link is dead(404). Discussed in https://github.com/aws-amplify/amplify-android/discussions/2305