Displaying 1 result from an estimated 1 matches for "progressinterv".
Did you mean:
progressinterval
2007 Sep 24
3
Trouble using backgroundrb
...t will be
# run automatically in a thread. You have access to all of your rails
# models. You also get logger and results method inside of this class
# by default.
class Passwd::GetPasswdsWorker < BackgrounDRb::Worker::RailsBase
attr_reader :progress
def do_work(args)
@progress = 0
@progressinterval = 100/System.count
System.find_all.each do |sys|
getAndParsePasswdFile(sys.name)
@progress += @progressinterval
end
end
def getAndParsePasswdFile(sys)
output = %x[some command-line-magic ;)]
output.each do |outputline|
outputline = outputline.split(":&q...