Skip to content

Commit

Permalink
Default request timeout to 30s instead 3 minutes
Browse files Browse the repository at this point in the history
(cherry picked from commit 15e90b7)
  • Loading branch information
mschering committed Nov 7, 2024
1 parent a3974d8 commit bfa9e42
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion www/go/core/views/extjs3/Jmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ go.Jmap = {

paused: 0,

requestTimeout: 180000,
requestTimeout: 30000,

/**
* Enable for XDEBUG profiling
Expand Down
7 changes: 6 additions & 1 deletion www/go/core/views/extjs3/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,6 @@ go.util = (function () {
* @return {undefined}
*/
exportToFile: function (entity, queryParams, extension, params) {



function doExport(columns) {
Expand All @@ -552,6 +551,10 @@ go.util = (function () {
params.columns = columns;
}

//allow longer requests for export. TODO. move this to a background process
const oldTimeout = go.Jmap.requestTimeout;
go.Jmap.requestTimeout = 180000;

return go.Jmap.request({
method: entity + "/export",
params: params
Expand All @@ -561,6 +564,8 @@ go.util = (function () {
Ext.MessageBox.alert(t("Error"), response.message);
}).finally(function() {
Ext.getBody().unmask();

go.Jmap.requestTimeout = oldTimeout;
})
}

Expand Down
2 changes: 1 addition & 1 deletion www/views/Extjs3/javascript/overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

//Default timeout 3 minutes.
Ext.override(Ext.data.Connection, {
timeout: 180000
timeout: 30000//180000
});

Ext.override(Ext.form.TimeField, {
Expand Down

0 comments on commit bfa9e42

Please sign in to comment.