Remove unnecessary double declaration of namespace in bulkpropagatorjob

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2023-05-11 20:02:14 +08:00
parent 4375a24f0f
commit 98b8fde2f0

View file

@ -33,12 +33,6 @@
#include <QJsonObject> #include <QJsonObject>
#include <QJsonValue> #include <QJsonValue>
namespace OCC {
Q_LOGGING_CATEGORY(lcBulkPropagatorJob, "nextcloud.sync.propagator.bulkupload", QtInfoMsg)
}
namespace { namespace {
QByteArray getEtagFromJsonReply(const QJsonObject &reply) QByteArray getEtagFromJsonReply(const QJsonObject &reply)
@ -65,14 +59,15 @@ QByteArray getHeaderFromJsonReply(const QJsonObject &reply, const QByteArray &he
} }
constexpr auto batchSize = 100; constexpr auto batchSize = 100;
constexpr auto parallelJobsMaximumCount = 1; constexpr auto parallelJobsMaximumCount = 1;
} }
namespace OCC { namespace OCC {
BulkPropagatorJob::BulkPropagatorJob(OwncloudPropagator *propagator, Q_LOGGING_CATEGORY(lcBulkPropagatorJob, "nextcloud.sync.propagator.bulkupload", QtInfoMsg)
const std::deque<SyncFileItemPtr> &items)
BulkPropagatorJob::BulkPropagatorJob(OwncloudPropagator *propagator, const std::deque<SyncFileItemPtr> &items)
: PropagatorJob(propagator) : PropagatorJob(propagator)
, _items(items) , _items(items)
{ {
@ -230,6 +225,7 @@ void BulkPropagatorJob::triggerUpload()
adjustLastJobTimeout(job, timeout); adjustLastJobTimeout(job, timeout);
_jobs.append(job); _jobs.append(job);
job->start(); job->start();
if (parallelism() == PropagatorJob::JobParallelism::FullParallelism && _jobs.size() < parallelJobsMaximumCount) { if (parallelism() == PropagatorJob::JobParallelism::FullParallelism && _jobs.size() < parallelJobsMaximumCount) {
scheduleSelfOrChild(); scheduleSelfOrChild();
} }