comment #261 - Increase delay to avoid error 421
This commit is contained in:
parent
b1acb843dc
commit
b318a9b106
|
@ -44,6 +44,8 @@ import app.fedilab.android.sqlite.NotificationCacheDAO;
|
|||
import app.fedilab.android.sqlite.Sqlite;
|
||||
import es.dmoral.toasty.Toasty;
|
||||
|
||||
import static app.fedilab.android.helper.Helper.sleeps;
|
||||
|
||||
|
||||
/**
|
||||
* Created by Thomas on 24/08/2019.
|
||||
|
@ -138,7 +140,11 @@ public class BackupNotificationInDataBaseService extends IntentService {
|
|||
new NotificationCacheDAO(BackupNotificationInDataBaseService.this, db).insertNotification(tmpNotification, userId, instance);
|
||||
backupNotifications.add(tmpNotification);
|
||||
}
|
||||
SystemClock.sleep(500);
|
||||
try {
|
||||
Thread.sleep(2000);
|
||||
} catch (InterruptedException e) {
|
||||
SystemClock.sleep(2000);
|
||||
}
|
||||
} while (max_id != null && canContinue);
|
||||
|
||||
if (backupNotifications.size() > 0) {
|
||||
|
|
|
@ -138,7 +138,11 @@ public class BackupStatusInDataBaseService extends IntentService {
|
|||
new StatusCacheDAO(BackupStatusInDataBaseService.this, db).insertStatus(StatusCacheDAO.ARCHIVE_CACHE, tmpStatus, userId, instance);
|
||||
backupStatus.add(tmpStatus);
|
||||
}
|
||||
SystemClock.sleep(500);
|
||||
try {
|
||||
Thread.sleep(2000);
|
||||
} catch (InterruptedException e) {
|
||||
SystemClock.sleep(2000);
|
||||
}
|
||||
} while (max_id != null && canContinue);
|
||||
|
||||
if (backupStatus.size() > 0) {
|
||||
|
|
|
@ -122,7 +122,11 @@ public class BackupStatusService extends IntentService {
|
|||
List<Status> statuses = apiResponse.getStatuses();
|
||||
if (statuses.size() > 0)
|
||||
backupStatus.addAll(statuses);
|
||||
SystemClock.sleep(500);
|
||||
try {
|
||||
Thread.sleep(2000);
|
||||
} catch (InterruptedException e) {
|
||||
SystemClock.sleep(2000);
|
||||
}
|
||||
} while (max_id != null);
|
||||
|
||||
String fileName = account.getAcct() + "@" + account.getInstance() + Helper.dateFileToString(getApplicationContext(), new Date()) + ".csv";
|
||||
|
|
Loading…
Reference in New Issue