Skip to content

Provide a onDeadExecution method for RecurringTaskWithPersistentScheduleBuilder? Minor API update #705

@bobbyrne01

Description

@bobbyrne01

Hey,

Is there any reason a onDeadExecution method hasn't been provided to allow for custom implementation for tasks of type RecurringTaskWithPersistentSchedule?

Ideally, I'd like to be able to do something like:

dbTaskDefinition =
    Tasks.recurringWithPersistentSchedule(taskName, MyTaskData.class)
        .onDeadExecution(new CancelDeadExecution<>())
        .execute(something());

Similar to:

dbTaskDefinition =
    Tasks.oneTime(taskName, MyTaskData.class)
        .onDeadExecution(new CancelDeadExecution<>())
        .execute(something());

But there is no API to provide custom DeadExecutionHandler during creation. I only see onFailure.

Or does changing from ReviveDeadExecution for RecurringTaskWithPersistentSchedule not make sense from some design point of view?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions