wendy / com.levibostian.wendy.listeners / PendingTaskStatusListener

PendingTaskStatusListener

interface PendingTaskStatusListener

Listen to status updates on a specific PendingTask instance you care to listen to updates about.

This is usually used when you want to show UI updates in your app on a task. Show your user when a task needs to run, when it runs successfully, when it's skipped.

See Also

TaskRunnerListener

WendyConfig.addTaskStatusListenerForTask

Functions

complete

abstract fun complete(taskId: Long, successful: Boolean): Unit

The task runner is done running the PendingTask. The task was either successful or not.

errorRecorded

abstract fun errorRecorded(taskId: Long, errorMessage: String?, errorId: String?): Unit

There was an error recorded to Wendy for this PendingTask.

errorResolved

abstract fun errorResolved(taskId: Long): Unit

A previously recorded error for this PendingTask has been marked as resolved.

running

abstract fun running(taskId: Long): Unit

The task runner is running this exact PendingTask.

skipped

abstract fun skipped(taskId: Long, reason: ReasonPendingTaskSkipped): Unit

The task runner skipped running the PendingTask for some reason.