• Automatically reschedule the current task if governance is exhausted. Convenience function that composes governanceRemains and rescheduleIfNeeded

    Example

    // defaults to 200 units threshold and starts elapsed time tracking at this invocation
    sequence.takeWhile(autoReschedule())

    Parameters

    • Optional startTime: number

      when (as a Date timestamp) to start counting elapsed time for clock-time governance, defaults to Date.now()

    • Optional minutes: number

      threshold for maximum number of minutes allowed to elapse before rescheduling

    • Optional units: number

      threshold for minimum remaining governance units before rescheduling

    Returns (() => boolean)

      • (): boolean
      • Returns boolean

Generated using TypeDoc