A utility class for managing lease acquisition tasks in Listr2 based workflows.

Properties

ACQUIRE_LEASE_TASK_TITLE: "Acquire lease" = 'Acquire lease'

The title of the lease acquisition task used by Listr2.

DEFAULT_LEASE_ACQUIRE_ATTEMPTS: 10

The default number of attempts to try acquiring the lease before failing.

Methods

  • Creates a new Listr2 task for acquiring a lease with retry logic.

    Parameters

    • lease: Lease

      the lease to be acquired.

    • task: TaskWrapper<any, any, any>

      the parent task to which the lease acquisition task will be added.

    Returns Listr

    a new Listr2 task for acquiring a lease with retry logic.