Displaying 1 result from an estimated 1 matches for "increment_status".
2007 Nov 02
10
pre-release version of backgroundrb available now from svn
.... Also, you may encounter some bugs when you are
passing large objects around.
I will try to explain meat of a sample worker:
class FooWorker < MetaWorker
set_worker_name :foo_worker
attr_accessor :count
def worker_init
puts "Starting Foo Worker"
add_periodic_timer(4) { increment_status}
end
def process_request p_data
p p_data
end
def increment_status
@count ||= 0
@count += 1
register_status(@count)
end
end
First, I intend to wrap MetaWorker within a namespace(read module), so
pardon me there.
So, when backgroundrb starts it reads all the workers in
WO...