Sha256: 8abd08866d265edb507bd390248ce61a7d48944a729e7a5eeac7e68613a76165

Contents?: true

Size: 680 Bytes

Versions: 5

Compression:

Stored size: 680 Bytes

Contents

#begin
#    require File.join(File.dirname(__FILE__), '../lib/simple_worker')
#rescue Exception => ex
#    puts ex.message
#    require 'simple_worker'
#end
# Bump for new checksum.
class TestWorker < SimpleWorker::Base

    attr_accessor :s3_key, :times

    def run
        log 'running the test worker for moi '.upcase
        log 's3_key instance_variable = ' + self.s3_key.to_s

        @times.times do |i|
            log 'running at ' + i.to_s
            sleep 1
            set_progress(:percent=> (i / @times * 100))
        end
    end

    def set_complete(params=nil)
        log 'SET COMPLETE YAY!' + params[:task_set_id]
    end


end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
simple_worker-0.4.1 test/test_worker.rb
simple_worker-0.4.0 test/test_worker.rb
simple_worker-0.3.24 test/test_worker.rb
simple_worker-0.3.23 test/test_worker.rb
simple_worker-0.3.22 test/test_worker.rb