fix(daemon): sync workspaces immediately on startup
Run syncWorkspacesFromAPI once before entering the periodic ticker loop so newly created workspaces are discovered without the initial 30-second delay.
This commit is contained in:
parent
25ed043117
commit
219b174819
1 changed files with 3 additions and 0 deletions
|
|
@ -283,6 +283,9 @@ func (d *Daemon) configWatchLoop(ctx context.Context) {
|
|||
// and adds any new ones to the CLI config. The configWatchLoop will then
|
||||
// detect the config change and register runtimes for the new workspaces.
|
||||
func (d *Daemon) workspaceSyncLoop(ctx context.Context) {
|
||||
// Run immediately on startup before entering the periodic loop.
|
||||
d.syncWorkspacesFromAPI(ctx)
|
||||
|
||||
ticker := time.NewTicker(DefaultWorkspaceSyncInterval)
|
||||
defer ticker.Stop()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue