Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete the task based o the process response. #446

Open
chethangowda opened this issue Nov 28, 2023 · 0 comments
Open

Complete the task based o the process response. #446

chethangowda opened this issue Nov 28, 2023 · 0 comments

Comments

@chethangowda
Copy link

My code is here:

In Configuration

@Bean
public static Task<Void> foo() {
return Tasks.oneTime("foo")
    .execute((instance, ctx) -> {
        System.out.printf("FOO One Shot Task: %s, ctx: %s\n", instance, ctx);
        callingSomeMethod()
    });
}

Scheduling the task here

scheduler.schedule(SchedulerBean.foo().instance("1045"), Instant.now().plusSeconds(10));

My requirement is:
when task is received, we call the method callingSomeMethod()

  1. The task should not be removed from the table until the method returns a success response.
  2. The task should be restarted if method gives failure | something fails | returns false

Basically, can we delete or reschedule the task manually?

Thanks for any help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant