Remove redundant method for uploading editedFiles
This commit is contained in:
parent
3bcb907f85
commit
5ad1196172
|
@ -744,18 +744,6 @@ class FilesDB {
|
|||
return convertToFiles(results);
|
||||
}
|
||||
|
||||
Future<List<File>> getEditedRemoteFiles() async {
|
||||
final db = await instance.database;
|
||||
final results = await db.query(
|
||||
filesTable,
|
||||
where:
|
||||
'($columnCollectionID IS NOT NULL AND $columnCollectionID IS NOT -1) AND ($columnUploadedFileID IS NULL OR $columnUploadedFileID IS -1)',
|
||||
orderBy: '$columnCreationTime DESC',
|
||||
groupBy: columnLocalID,
|
||||
);
|
||||
return convertToFiles(results);
|
||||
}
|
||||
|
||||
Future<List<int>> getUploadedFileIDsToBeUpdated() async {
|
||||
final db = await instance.database;
|
||||
final rows = await db.query(
|
||||
|
|
|
@ -302,12 +302,8 @@ class RemoteSyncService {
|
|||
final updatedFileIDs = await _db.getUploadedFileIDsToBeUpdated();
|
||||
_logger.info(updatedFileIDs.length.toString() + " files updated.");
|
||||
|
||||
final editedFiles = await _db.getEditedRemoteFiles();
|
||||
_logger.info(editedFiles.length.toString() + " files edited.");
|
||||
|
||||
_completedUploads = 0;
|
||||
int toBeUploaded =
|
||||
filesToBeUploaded.length + updatedFileIDs.length + editedFiles.length;
|
||||
int toBeUploaded = filesToBeUploaded.length + updatedFileIDs.length;
|
||||
|
||||
if (toBeUploaded > 0) {
|
||||
Bus.instance.fire(SyncStatusUpdate(SyncStatus.preparingForUpload));
|
||||
|
@ -343,15 +339,6 @@ class RemoteSyncService {
|
|||
_uploadFile(file, collectionID, futures);
|
||||
}
|
||||
|
||||
for (final file in editedFiles) {
|
||||
if (_shouldThrottleSync() &&
|
||||
futures.length >= kMaximumPermissibleUploadsInThrottledMode) {
|
||||
_logger.info("Skipping some edited files as we are throttling uploads");
|
||||
break;
|
||||
}
|
||||
_uploadFile(file, file.collectionID, futures);
|
||||
}
|
||||
|
||||
try {
|
||||
await Future.wait(futures);
|
||||
} on InvalidFileError {
|
||||
|
|
Loading…
Reference in a new issue