Class: Wurk::Debounce::Outcome

Inherits:
Struct
  • Object
show all
Defined in:
lib/wurk/debounce.rb

Overview

What one debounced enqueue did to the pending entry.

replaced is the only part a caller cannot work out for itself: from outside the script, extending a live burst and opening a new one look identical. at is the epoch second the job will run — capped, so it is not necessarily now + wait. opened_at is the burst's own start, the clock max_wait is measured against.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#atObject

Returns the value of attribute at

Returns:

  • (Object)

    the current value of at



56
57
58
# File 'lib/wurk/debounce.rb', line 56

def at
  @at
end

#opened_atObject

Returns the value of attribute opened_at

Returns:

  • (Object)

    the current value of opened_at



56
57
58
# File 'lib/wurk/debounce.rb', line 56

def opened_at
  @opened_at
end

#replacedObject

Returns the value of attribute replaced

Returns:

  • (Object)

    the current value of replaced



56
57
58
# File 'lib/wurk/debounce.rb', line 56

def replaced
  @replaced
end

Instance Method Details

#replaced?Boolean

True when this push displaced a still-pending sibling.

Returns:

  • (Boolean)


58
# File 'lib/wurk/debounce.rb', line 58

def replaced? = replaced