File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -554,8 +554,8 @@ def initialize_zoom_progress
554554 existing = @route [ :db ] [ :tile_scan_progress ] . where ( source : @source_name , zoom_level : z ) . first
555555
556556 if existing && [ 'error' , 'critical_error' ] . include? ( existing [ :status ] )
557- reset_zoom_progress ( z )
558- LOGGER . info ( "Reset #{ existing [ :status ] } status for zoom #{ z } of #{ @source_name } on startup" )
557+ @route [ :db ] [ :tile_scan_progress ] . where ( source : @source_name , zoom_level : z ) . update ( status : 'waiting' )
558+ LOGGER . info ( "Reset #{ existing [ :status ] } status for zoom #{ z } of #{ @source_name } on startup (keeping progress) " )
559559 elsif existing && existing [ :status ] == 'source_unavailable'
560560 @route [ :db ] [ :tile_scan_progress ] . where ( source : @source_name , zoom_level : z ) . update ( status : 'stopped' )
561561 LOGGER . info ( "Reset source_unavailable status (keeping coordinates) for zoom #{ z } of #{ @source_name } on startup" )
@@ -597,6 +597,8 @@ def zoom_complete?(z)
597597 false
598598 elsif [ 'active' , 'stopped' , 'waiting' ] . include? ( current_status )
599599 false
600+ elsif [ 'error' , 'critical_error' ] . include? ( current_status )
601+ false
600602 else
601603 reset_zoom_progress ( z )
602604 false
You can’t perform that action at this time.
0 commit comments