~michihenning/thumbnailer/fix-1531038

« back to all changes in this revision

Viewing changes to include/internal/thumbnailer.h

  • Committer: Michi Henning
  • Date: 2016-01-04 11:36:43 UTC
  • mfrom: (325.1.1 exponential-backoff)
  • Revision ID: michi.henning@canonical.com-20160104113643-c4ip8obict2kyjz3
Michi Henning 2016-01-04 Added exponential backoff for unexpected server errors.

Merging by hand, now that Jenkins has been turned off.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#pragma once
20
20
 
21
21
#include <internal/artdownloader.h>
 
22
#include <internal/backoff_adjuster.h>
22
23
#include <internal/cachehelper.h>
23
24
 
24
25
#include <QObject>
131
132
    PersistentCacheHelper::UPtr failure_cache_;           // Cache for failed attempts (value is always empty).
132
133
    int max_size_;                                        // Max thumbnail size in pixels.
133
134
    int retry_not_found_hours_;                           // Retry wait time for authoritative "no artwork" answer.
134
 
    int retry_error_hours_;                               // Retry wait time for unexpected server errors.
135
135
    std::chrono::milliseconds extraction_timeout_;        // How long to wait before giving up during extraction.
136
 
    std::chrono::system_clock::time_point nw_fail_time_;  // Last time we had transient network error.
137
136
    std::unique_ptr<ArtDownloader> downloader_;
 
137
    BackoffAdjuster backoff_;
138
138
 
139
139
    friend class RequestBase;
140
140
};