Skip to content

Commit d4c1117

Browse files
committed
chore: better init and snapshot restore
1 parent 305db48 commit d4c1117

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cmd/serve.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ func initScroll(scrollService *services.ScrollService, snapshotService ports.Sna
376376
return false, err
377377
}
378378

379-
_, err = scrollService.ReloadScroll()
379+
currentScroll, err := scrollService.ReloadScroll()
380380
if err != nil {
381381
return false, err
382382
}
@@ -387,6 +387,12 @@ func initScroll(scrollService *services.ScrollService, snapshotService ports.Sna
387387
}
388388

389389
newScroll = len(lock.Statuses) == 0
390+
391+
//if we have a new scroll, we do this anyways, just ensure that the init command is there, also allready initialized stuff
392+
if !newScroll {
393+
//initialize if nothing is there
394+
queueManager.AddAndRememberItem(currentScroll.Init)
395+
}
390396
}
391397

392398
if newScroll {

0 commit comments

Comments
 (0)