Skip to content

Commit

Permalink
Merge pull request #2110 from threefoldtech/main_perf_fix
Browse files Browse the repository at this point in the history
fix the loopvar issue on jobFunc
  • Loading branch information
Omarabdul3ziz authored Nov 14, 2023
2 parents 9cb513e + 0ce2f85 commit aca354f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/perf/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func (pm *PerformanceMonitor) runTask(ctx context.Context, task Task) error {
func (pm *PerformanceMonitor) Run(ctx context.Context) error {
ctx = withZbusClient(ctx, pm.zbusClient)
for _, task := range pm.tasks {
task := task
if _, err := pm.scheduler.CronWithSeconds(task.Cron()).Do(func() error {
return pm.runTask(ctx, task)
}); err != nil {
Expand Down

0 comments on commit aca354f

Please sign in to comment.