Sha256: 48ac5784348842ecc198d0538eb9604dc317c40caca8f7fa25ece1f5117b68d7
Contents?: true
Size: 515 Bytes
Versions: 9
Compression:
Stored size: 515 Bytes
Contents
require 'rush' module Delayed module Workless module Scaler class Local < Base def up Rush::Box.new[Rails.root].bash("rake jobs:work", :background => true) true end def down Rush::Box.new.processes.filter(:cmdline => /rake jobs:work/).kill unless workers == 0 or jobs.count > 0 true end def workers Rush::Box.new.processes.filter(:cmdline => /rake jobs:work/).size end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems