Improve toString for reactive ScheduledTask #34010
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Hello,
There were some improvements in the
actuator/scheduledtasks
endpoint in SpringBoot 3.4 which are great but when the task is reactive (kotlinsuspend
function in my case but I think the same applies for reactor types), the task is wrapped inSubscribingRunnable
and therefore the name of the task (inrunnable.target
) does not show the actual name of the task:I checked the sources and it does not seem there is an easy way how to change the value. The
SubscribingRunnable.toString
is used. My suggestion is to override thetoString
method inSubscribingRunnable
to show coordinates of the actual task method.So TLDR:
Problem: Name of scheduled task in
actuator/scheduledtasks
is useless when task is wrapped inSubscribingRunnable
Desired state: The name is taken from the actual task class/method, not
SubscribingRunnable
.SpringBoot version: 3.4.0
The text was updated successfully, but these errors were encountered: