Skip to content

Commit 576175a

Browse files
committed
cli/demo: start job scheduler right away
Previously we started it quickly but only in the system tenant. Now we start it quickly in all. Also run it more often. Release note: none. Epic: none.
1 parent 8c0fdd4 commit 576175a

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

pkg/cli/democluster/demo_cluster.go

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,15 @@ func (c *transientCluster) startTenantService(
535535
InjectedLatencyEnabled: c.latencyEnabled.Load,
536536
},
537537
},
538+
JobsTestingKnobs: &jobs.TestingKnobs{
539+
// Allow the scheduler daemon to start earlier in demo.
540+
SchedulerDaemonInitialScanDelay: func() time.Duration {
541+
return time.Second * 2
542+
},
543+
SchedulerDaemonScanDelay: func() time.Duration {
544+
return time.Second * 5
545+
},
546+
},
538547
},
539548
}
540549

@@ -563,6 +572,15 @@ func (c *transientCluster) startTenantService(
563572
InjectedLatencyEnabled: c.latencyEnabled.Load,
564573
},
565574
},
575+
JobsTestingKnobs: &jobs.TestingKnobs{
576+
// Allow the scheduler daemon to start earlier in demo.
577+
SchedulerDaemonInitialScanDelay: func() time.Duration {
578+
return time.Second * 2
579+
},
580+
SchedulerDaemonScanDelay: func() time.Duration {
581+
return time.Second * 5
582+
},
583+
},
566584
},
567585
})
568586
if err != nil {
@@ -924,7 +942,10 @@ func (demoCtx *Context) testServerArgsForTransientCluster(
924942
JobsTestingKnobs: &jobs.TestingKnobs{
925943
// Allow the scheduler daemon to start earlier in demo.
926944
SchedulerDaemonInitialScanDelay: func() time.Duration {
927-
return time.Second * 15
945+
return time.Second * 2
946+
},
947+
SchedulerDaemonScanDelay: func() time.Duration {
948+
return time.Second * 5
928949
},
929950
},
930951
},

0 commit comments

Comments
 (0)