lib/rubyrep/replication_run.rb in rubyrep-1.0.8 vs lib/rubyrep/replication_run.rb in rubyrep-1.0.9
- old
+ new
@@ -26,10 +26,10 @@
def run
return unless [:left, :right].any? do |database|
changes_pending = false
t = Thread.new do
changes_pending = session.send(database).select_one(
- "select id from #{session.configuration.options[:rep_prefix]}_pending_changes"
+ "select id from #{session.configuration.options[:rep_prefix]}_pending_changes limit 1"
) != nil
end
t.join session.configuration.options[:database_connection_timeout]
changes_pending
end