Increase timeout for selfupdate
This commit is contained in:
parent
ed64aa4ff9
commit
171ccd1960
|
|
@ -129,6 +129,7 @@ const int kMaxNumberOfCompanies = 10;
|
|||
const int kMaxNumberOfHistory = 50;
|
||||
const int kMaxRecordsPerApiPage = 5000;
|
||||
const int kMaxPostSeconds = 30;
|
||||
const int kMaxRawPostSeconds = 180;
|
||||
const int kMillisecondsToRefreshData = 1000 * 60 * 15; // 15 minutes
|
||||
const int kUpdatedAtBufferSeconds = 600;
|
||||
const int kMillisecondsToRefreshActivities = 1000 * 60 * 60 * 24; // 1 day
|
||||
|
|
|
|||
|
|
@ -79,16 +79,22 @@ class WebClient {
|
|||
response = await _uploadFiles(url, token, multipartFiles, data: data);
|
||||
} else {
|
||||
response = await http.Client()
|
||||
.post(url,
|
||||
body: data,
|
||||
headers: _getHeaders(
|
||||
url,
|
||||
token,
|
||||
secret: secret,
|
||||
password: password,
|
||||
idToken: idToken,
|
||||
))
|
||||
.timeout(const Duration(seconds: kMaxPostSeconds));
|
||||
.post(
|
||||
url,
|
||||
body: data,
|
||||
headers: _getHeaders(
|
||||
url,
|
||||
token,
|
||||
secret: secret,
|
||||
password: password,
|
||||
idToken: idToken,
|
||||
),
|
||||
)
|
||||
.timeout(
|
||||
Duration(
|
||||
seconds: rawResponse ? kMaxRawPostSeconds : kMaxPostSeconds,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if (rawResponse) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue