$ mix new chatter --umbrella
$ cd chatter
$ cd apps
# FOR BUSY JOBS | |
# take the process_id from the /busy page in sidekiq and kill the longest running one. | |
workers = Sidekiq::Workers.new | |
long_process_id = 'integration.3:4:71111aaa111' # Eg: 'integration.3:4:71d1d7f4ef5a' | |
workers.each do |process_id, thread_id, work| | |
process = Sidekiq::Process.new('identity' => process_id) | |
process.stop! if process_id == long_process_id | |
end | |
# FOR SCHEDULED JOBS |
N+1 query problem
eager_load
where
preload