You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking for a more resilient way than SpringBoot @async to execute tasks , while keeping task definition and execution easy.
My understanding is i have to create a Task Bean for each Async Job, but it's quite verbose and task must be configured in a separate class.
I think defining one task and executing arbitrary lambda, passing it as data, would come with Serialization problems .
Do you think it would be possible to scan annotations (here @MyAsync), creating one Task for each occurence , and passing them when initializing the scheduler ?
@MyAsync
public void myTask() {
...
}
...
myTask() -> trigger the task scheduling
The text was updated successfully, but these errors were encountered:
That sounds like a good feature. Scanning for annotations and setting up recurring tasks (or one time) for them automatically. And as a side-note, also interested in how easy it is to hook into the Spring @scheduled annotation.
I think defining one task and executing arbitrary lambda, passing it as data, would come with Serialization problems .
Yeah I am not a big fan of that approach if it can be avoided. (if there is a fixed set of tasks)
Hello,
I'm looking for a more resilient way than SpringBoot @async to execute tasks , while keeping task definition and execution easy.
My understanding is i have to create a Task Bean for each Async Job, but it's quite verbose and task must be configured in a separate class.
I think defining one task and executing arbitrary lambda, passing it as data, would come with Serialization problems .
Do you think it would be possible to scan annotations (here @MyAsync), creating one Task for each occurence , and passing them when initializing the scheduler ?
@MyAsync
public void myTask() {
...
}
...
myTask() -> trigger the task scheduling
The text was updated successfully, but these errors were encountered: