This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'thin' | |
require 'rack' | |
success = Rack::URLMap.new("/" => lambda { |env| [200, {"Content-Type" => "text/plain"}, ["bar"]] }) | |
success_app = Rack::Builder.new { | |
use Rack::Lock | |
run success | |
}.to_app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
accounts = (AccountRepository.pluck(:subdomain) -['lc7', 'policaro', 'dvnt', 'gds', 'countryhills', 'halman', 'entertech', 'autogroup', 'muskokachrysler', 'multipayroll', 'july8mike', 'amanda', 'nchem']) | |
accounts.each do |account| | |
Apartment::Database.switch account | |
entries = EntryRepository.connection.exec_query('select e.* from entry_repository e INNER JOIN user_repository u ON e.user_id=u.id where e.deleted_at IS NULL ORDER BY e.time;') | |
request = Request.new | |
entries.each do |row| | |
request.current_user = UserRepository.with_deleted.where(id: row["user_id"]).first |