Sha256: 28128a58ca907fe89a5231be3c018c81a93c4901926c8c6dffee557d396e769c

Contents?: true

Size: 438 Bytes

Versions: 7

Compression:

Stored size: 438 Bytes

Contents

# hack for functional tests
require File.dirname(__FILE__) + '/../../../memcache/lib/memcache_extended'
require File.dirname(__FILE__) + '/../../../memcache/lib/memcache_util'

class HelloWorker < SweatShop::Worker
  TEST_FILE = File.dirname(__FILE__) + '/test.txt' unless defined?(TEST_FILE)

  def hello(name)
    puts name
    "Hi, #{name}"
  end

  after_task do |task|
    File.open(TEST_FILE, 'w'){|f| f << task[:result]}
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
famoseagle-sweat_shop-0.3.0 test/hello_worker.rb
famoseagle-sweat_shop-0.5.0 test/hello_worker.rb
famoseagle-sweat_shop-0.6.0 test/hello_worker.rb
famoseagle-sweat_shop-0.7.0 test/hello_worker.rb
famoseagle-sweat_shop-0.8.0 test/hello_worker.rb
famoseagle-sweat_shop-0.8.1 test/hello_worker.rb
famoseagle-sweat_shop-0.8.2 test/hello_worker.rb