aboutsummaryrefslogtreecommitdiff
path: root/jobs
diff options
context:
space:
mode:
Diffstat (limited to 'jobs')
-rw-r--r--jobs/basejob.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/jobs/basejob.cpp b/jobs/basejob.cpp
index 77f90596..26ceb268 100644
--- a/jobs/basejob.cpp
+++ b/jobs/basejob.cpp
@@ -127,9 +127,10 @@ void BaseJob::Private::sendRequest()
{
QUrl url = connection->baseUrl();
url.setPath( url.path() + "/" + apiEndpoint );
+ QUrlQuery q = requestQuery;
if (needsToken)
- requestQuery.addQueryItem("access_token", connection->accessToken());
- url.setQuery(requestQuery);
+ q.addQueryItem("access_token", connection->accessToken());
+ url.setQuery(q);
QNetworkRequest req {url};
req.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
@@ -236,6 +237,9 @@ void BaseJob::finishJob()
if ((error() == NetworkError || error() == TimeoutError)
&& d->retriesTaken < d->maxRetries)
{
+ // TODO: The whole retrying thing should be put to ConnectionManager
+ // otherwise independently retrying jobs make a bit of notification
+ // storm towards the UI.
const auto retryInterval = getNextRetryInterval();
++d->retriesTaken;
qCWarning(d->logCat) << this << "will take retry" << d->retriesTaken