30 lines
494 B
Ruby
30 lines
494 B
Ruby
|
|
require 'resque'
|
||
|
|
|
||
|
|
module JamRuby
|
||
|
|
|
||
|
|
# this job exists as a way to manually test a bunch of jobs firing at once. It's not a real job.
|
||
|
|
class StressJob
|
||
|
|
extend JamRuby::ResqueStats
|
||
|
|
|
||
|
|
@queue = :stress_job
|
||
|
|
|
||
|
|
@@log = Logging.logger[StressJob]
|
||
|
|
|
||
|
|
|
||
|
|
def self.perform
|
||
|
|
|
||
|
|
@@log.debug("STARTING")
|
||
|
|
100.times do
|
||
|
|
user = User.first.id
|
||
|
|
diagnostic = Diagnostic.first.user_id
|
||
|
|
count = Diagnostic.all.count
|
||
|
|
end
|
||
|
|
@@log.debug("ENDING")
|
||
|
|
|
||
|
|
end
|
||
|
|
end
|
||
|
|
|
||
|
|
end
|
||
|
|
|
||
|
|
|