File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ function statusMessage(status) {
167167}
168168
169169let updateIntervalId = 0 ;
170+ let finishedWikiCount = 0 ;
170171
171172function updateStatus ( ) {
172173 fetch ( '/backup/status' ) . then ( response => response . json ( ) ) . then ( data => {
@@ -201,7 +202,9 @@ function updateStatus() {
201202 case MessageType . ErrorFatal : messageStrings . push ( `[${ msg . tag } ] Kritická chyba: ${ msg . error_message } ` ) ; break ;
202203 case MessageType . FinishSuccess :
203204 messageStrings . push ( `[${ msg . tag } ] Záloha dokončena, zpracovávám data` ) ;
204- clearInterval ( updateIntervalId ) ;
205+ if ( ++ finishedWikiCount === data . length ) {
206+ clearInterval ( updateIntervalId ) ;
207+ }
205208 break ;
206209 }
207210 } )
@@ -222,6 +225,7 @@ function logMessage(message) {
222225}
223226
224227async function start_backup ( ) {
228+ finishedWikiCount = 0 ;
225229 updateIntervalId = setInterval ( updateStatus , 2000 ) ;
226230 $ ( '#status-text' ) . text ( 'Záloha spuštěna' ) ;
227231 let response = await fetch ( '/backup/start' )
You can’t perform that action at this time.
0 commit comments