Sha256: bb85bc14a22dae7fec863a46c217ac70626662c0b06f87257716e8bbceca6804

Contents?: true

Size: 510 Bytes

Versions: 9

Compression:

Stored size: 510 Bytes

Contents

$:.unshift "lib"
require 'backburner'

# Define ruby job
class TestJob
  include Backburner::Queue
  # queue "test-job"

  def self.perform(value, user)
    puts "[TestJob] Running perform with args: [#{value}, #{user}]"
  end
end

# Configure Backburner
Backburner.configure do |config|
  config.beanstalk_url = "beanstalk://127.0.0.1"
  config.tube_namespace = "demo.production"
end

# Enqueue tasks
Backburner.enqueue TestJob, 5, 3
Backburner.enqueue TestJob, 10, 6

# Work tasks
Backburner.work("test-job")

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
backburner-0.2.6 examples/custom.rb
backburner-0.2.5 examples/custom.rb
backburner-0.2.0 examples/custom.rb
backburner-0.1.2 examples/custom.rb
backburner-0.1.1 examples/custom.rb
backburner-0.1.0 examples/custom.rb
backburner-0.0.3 examples/custom.rb
backburner-0.0.2 examples/custom.rb
backburner-0.0.1 examples/custom.rb