amplify-android icon indicating copy to clipboard operation
amplify-android copied to clipboard

Multi-threads for calling Amplify.Storage.uploadFile method without network connected

Open tylerjroach opened this issue 2 years ago • 2 comments

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

  1. 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?
  2. as for the upper code, is there a side effect of using enqueue nest work in the main process?
  3. what is the max not be done job number that can be held by amplify?

for amplify v1.38.0

  1. as for the upper code, is there a side effect of using enqueue for many works?
  2. what is the max not be done job number that can be held by amplify?

Thanks.

tylerjroach avatar Mar 06 '23 18:03 tylerjroach

Moving Discussion question to issues.

tylerjroach avatar Mar 06 '23 18:03 tylerjroach

the link is dead(404). Discussed in https://github.com/aws-amplify/amplify-android/discussions/2305

waertf avatar Mar 07 '23 03:03 waertf