fix integration test

pull/923/head
Molham 2025-04-19 15:31:19 +02:00 committed by Bastien Wirtz
parent 07207dca55
commit 9e314c960b
1 changed files with 7 additions and 5 deletions

View File

@ -39,6 +39,8 @@ export default {
retryCount: 0, retryCount: 0,
maxRetries: 3, maxRetries: 3,
retryDelay: 5000, retryDelay: 5000,
localCheckInterval: 1000, // Default value or a fallback
pollInterval: null,
}), }),
computed: { computed: {
percentage: function () { percentage: function () {
@ -53,6 +55,8 @@ export default {
}, },
created() { created() {
if (parseInt(this.item.apiVersion, 10) === 6) { if (parseInt(this.item.apiVersion, 10) === 6) {
// Set the interval to the checkInterval or default to 5 minutes
this.localCheckInterval = parseInt(this.item.checkInterval, 10) || 300000;
this.loadCachedSession(); this.loadCachedSession();
this.startStatusPolling(); this.startStatusPolling();
} else { } else {
@ -73,12 +77,10 @@ export default {
}, },
startStatusPolling: function () { startStatusPolling: function () {
this.fetchStatus(); this.fetchStatus();
// Set the interval to the checkInterval or default to 5 minutes if (this.localCheckInterval < 1000) {
const interval = parseInt(this.item.checkInterval, 10) || 300000; this.localCheckInterval = 1000;
if (this.item.checkInterval < 1000) {
this.item.checkInterval = 1000;
} }
this.pollInterval = setInterval(this.fetchStatus, interval); this.pollInterval = setInterval(this.fetchStatus, this.localCheckInterval);
}, },
stopStatusPolling: function () { stopStatusPolling: function () {
if (this.pollInterval) { if (this.pollInterval) {