Class: ExampleMonitoredWorker
- Inherits:
-
Object
- Object
- ExampleMonitoredWorker
- Includes:
- BackgroundFu::WorkerMonitoring
- Defined in:
- lib/generators/background/templates/example_monitored_worker.rb
Instance Method Summary (collapse)
Methods included from BackgroundFu::WorkerMonitoring
Instance Method Details
- (Object) long_and_monitored
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/generators/background/templates/example_monitored_worker.rb', line 6 def long_and_monitored my_progress = 0 record_progress(my_progress) while(my_progress < 100) my_progress += 1 record_progress(my_progress) sleep 1 end record_progress(100) end |