Cron background jobs for more complex calculations
Performance issues in the app as it performs complex calculations leading to CPU resources getting tied up and there will be that one moment when you start dropping traffic because of DB locks
ActiveRecord::Base.connection.tables.each do |table| klass = table.classify if Time.now > @checkpoint[klass] warehouse_extract(klass.constantize.where(updated_at: @checkpoint[klass]..Time.now)) end end
ActiveRecord::Base.connection.tables.each do |table| klass = table.classify if Time.now > @checkpoint[klass] warehouse_extract(klass.constantize.where(updated_at: @checkpoint[klass]..Time.now, test: false, secret: false)) end end