Class: Deimos::Utils::DbPoller::PollStatus

Inherits:
Struct
  • Object
show all
Defined in:
lib/deimos/utils/db_poller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#batches_erroredObject

Returns the value of attribute batches_errored

Returns:

  • (Object)

    the current value of batches_errored



35
36
37
# File 'lib/deimos/utils/db_poller.rb', line 35

def batches_errored
  @batches_errored
end

#batches_processedObject

Returns the value of attribute batches_processed

Returns:

  • (Object)

    the current value of batches_processed



35
36
37
# File 'lib/deimos/utils/db_poller.rb', line 35

def batches_processed
  @batches_processed
end

#messages_processedObject

Returns the value of attribute messages_processed

Returns:

  • (Object)

    the current value of messages_processed



35
36
37
# File 'lib/deimos/utils/db_poller.rb', line 35

def messages_processed
  @messages_processed
end

Instance Method Details

#current_batchInteger

Returns:

  • (Integer)


38
39
40
# File 'lib/deimos/utils/db_poller.rb', line 38

def current_batch
  batches_processed + 1
end

#reportString

Returns:

  • (String)


43
44
45
# File 'lib/deimos/utils/db_poller.rb', line 43

def report
  "#{batches_processed} batches, #{batches_errored} errored batches, #{messages_processed} processed messages"
end