Class: TableSync::Publishing::Single

Inherits:
Object
  • Object
show all
Includes:
Memery, Tainbox
Defined in:
lib/table_sync/publishing/single.rb

Instance Method Summary collapse

Instance Method Details

#publish_laterObject

expect job to have perform_at method debounce destroyed event because otherwise update event could be sent after destroy



16
17
18
19
20
21
22
# File 'lib/table_sync/publishing/single.rb', line 16

def publish_later
  return if debounce.skip?

  job.perform_at(job_attributes)

  debounce.cache_next_sync_time
end

#publish_nowObject



24
25
26
# File 'lib/table_sync/publishing/single.rb', line 24

def publish_now
  message.publish unless message.empty?
end