mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
remove old broken example, fixes #4016
This commit is contained in:
parent
0e3ff21711
commit
8bdd1d8f3d
1 changed files with 0 additions and 27 deletions
|
@ -1,27 +0,0 @@
|
|||
# Making sure we do not leak memory
|
||||
|
||||
require 'sidekiq'
|
||||
|
||||
$c = 0
|
||||
$max = 10_000
|
||||
|
||||
# Start up sidekiq via
|
||||
# ./bin/sidekiq -r ./examples/leak.rb > /dev/null
|
||||
class MyWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
def perform
|
||||
$c += 1
|
||||
if $c % 100 == 0
|
||||
GC.start
|
||||
memory = `ps -o rss -p #{Process.pid}`.chomp.split("\n").last.to_i
|
||||
$stderr.puts "Using memory #{memory}"
|
||||
end
|
||||
if $c >= $max
|
||||
exit
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# schedule some jobs to work on
|
||||
$max.times { MyWorker.perform_async }
|
Loading…
Reference in a new issue