SchedulerMonSvc: fix uninitialized variable

Frank Winklmeier requested to merge fwinkl/athena:schedulermonsvc into 23.0

Lambda is being called from outside its original scope and hence needs to capture variables by value. Not clear if this had any impact but it fixes valgrind warnings.

Closes ATR-22381.

Merge request reports