Sha256: b2c935015e578957d3e149d2ef9796757545b0cc44ce5fef361ae69ce8f30d8c
Contents?: true
Size: 923 Bytes
Versions: 17
Compression:
Stored size: 923 Bytes
Contents
require 'active_record' ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => ':memory:') ActiveRecord::Base.logger = Delayed::Worker.logger ActiveRecord::Migration.verbose = false ActiveRecord::Schema.define do create_table :delayed_jobs, :force => true do |table| table.integer :priority, :default => 0 table.integer :attempts, :default => 0 table.text :handler table.text :last_error table.datetime :run_at table.datetime :locked_at table.datetime :failed_at table.string :locked_by table.timestamps end add_index :delayed_jobs, [:priority, :run_at], :name => 'delayed_jobs_priority' create_table :stories, :force => true do |table| table.string :text end end # Purely useful for test cases... class Story < ActiveRecord::Base def tell; text; end def whatever(n, _); tell*n; end handle_asynchronously :whatever end
Version data entries
17 entries across 17 versions & 6 rubygems