File tree 1 file changed +16
-10
lines changed
Filter options
1 file changed +16
-10
lines changed
Original file line number Diff line number Diff line change @@ -80,16 +80,7 @@ func New(cfg *dblabCfg.Config, engineProps global.EngineProps, docker *client.Cl
80
80
},
81
81
}
82
82
83
- for _ , jobName := range r .cfg .Jobs {
84
- jobSpec , ok := r .cfg .JobsSpec [jobName ]
85
- if ! ok {
86
- continue
87
- }
88
-
89
- jobSpec .Name = jobName
90
- r .jobSpecs [jobName ] = jobSpec
91
- }
92
-
83
+ r .formatJobsSpec ()
93
84
r .defineRetrievalMode ()
94
85
95
86
return r
@@ -99,6 +90,8 @@ func New(cfg *dblabCfg.Config, engineProps global.EngineProps, docker *client.Cl
99
90
func (r * Retrieval ) Reload (ctx context.Context , cfg * dblabCfg.Config ) {
100
91
* r .cfg = cfg .Retrieval
101
92
93
+ r .formatJobsSpec ()
94
+
102
95
for _ , job := range r .jobs {
103
96
cfg , ok := r .cfg .JobsSpec [job .Name ()]
104
97
if ! ok {
@@ -111,9 +104,22 @@ func (r *Retrieval) Reload(ctx context.Context, cfg *dblabCfg.Config) {
111
104
}
112
105
}
113
106
107
+ r .stopScheduler ()
114
108
r .setupScheduler (ctx )
115
109
}
116
110
111
+ func (r * Retrieval ) formatJobsSpec () {
112
+ for _ , jobName := range r .cfg .Jobs {
113
+ jobSpec , ok := r .cfg .JobsSpec [jobName ]
114
+ if ! ok {
115
+ continue
116
+ }
117
+
118
+ jobSpec .Name = jobName
119
+ r .jobSpecs [jobName ] = jobSpec
120
+ }
121
+ }
122
+
117
123
// Run start retrieving process.
118
124
func (r * Retrieval ) Run (ctx context.Context ) error {
119
125
runCtx , cancel := context .WithCancel (ctx )
You can’t perform that action at this time.
0 commit comments