Override parallelism() for uploads

This way we'll be able to control parallelism for upload jobs.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
Kevin Ottens 2020-07-01 13:20:56 +02:00 committed by Kevin Ottens (Rebase PR Action)
parent 5e20e2b46f
commit 27b982ceaf
2 changed files with 9 additions and 0 deletions

View file

@ -168,11 +168,17 @@ PropagateUploadFileCommon::PropagateUploadFileCommon(OwncloudPropagator *propaga
: PropagateItemJob(propagator, item)
, _finished(false)
, _deleteExisting(false)
, _parallelism(FullParallelism)
, _uploadEncryptedHelper(nullptr)
, _uploadingEncrypted(false)
{
}
PropagatorJob::JobParallelism PropagateUploadFileCommon::parallelism()
{
return _parallelism;
}
void PropagateUploadFileCommon::setDeleteExisting(bool enabled)
{
_deleteExisting = enabled;

View file

@ -226,10 +226,13 @@ protected:
};
UploadFileInfo _fileToUpload;
QByteArray _transmissionChecksumHeader;
JobParallelism _parallelism;
public:
PropagateUploadFileCommon(OwncloudPropagator *propagator, const SyncFileItemPtr &item);
JobParallelism parallelism() override;
/**
* Whether an existing entity with the same name may be deleted before
* the upload.