lib/deimos/utils/db_poller/state_based.rb in deimos-ruby-1.18.0 vs lib/deimos/utils/db_poller/state_based.rb in deimos-ruby-1.18.1
- old
+ new
@@ -37,10 +37,10 @@
def finalize_batch(batch, success)
@info.touch
state = success ? @config.published_state : @config.failed_state
klass = batch.first.class
- id_col = record.class.primary_key
+ id_col = klass.primary_key.to_sym
timestamp_col = @config.timestamp_column
attrs = { timestamp_col => Time.zone.now }
attrs[@config.state_column] = state if state
if @config.publish_timestamp_column