Sha256: f5bb31419150fb57ac48f66bfdbbb4cfecd113198f948f5a51f87fbd57be2cdd

Contents?: true

Size: 390 Bytes

Versions: 12

Compression:

Stored size: 390 Bytes

Contents

class ExampleMonitoredWorker
  
  # After including worker monitoring you can invoke record_progress() method.
  include BackgroundFu::WorkerMonitoring
  
  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
  
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
genki-background_fu-1.0.8.2 generators/background/templates/example_monitored_worker.rb
genki-background_fu-1.0.9.1 generators/background/templates/example_monitored_worker.rb
genki-background_fu-1.0.9.2 generators/background/templates/example_monitored_worker.rb
genki-background_fu-1.0.9 generators/background/templates/example_monitored_worker.rb
ncr-background_fu-1.0.10 generators/background/templates/example_monitored_worker.rb
ncr-background_fu-1.0.2 generators/background/templates/example_monitored_worker.rb
ncr-background_fu-1.0.4 generators/background/templates/example_monitored_worker.rb
ncr-background_fu-1.0.5 generators/background/templates/example_monitored_worker.rb
ncr-background_fu-1.0.6 generators/background/templates/example_monitored_worker.rb
ncr-background_fu-1.0.7 generators/background/templates/example_monitored_worker.rb
ncr-background_fu-1.0.8 generators/background/templates/example_monitored_worker.rb
ncr-background_fu-1.0.9 generators/background/templates/example_monitored_worker.rb