Skip to content

Commit

Permalink
Whitespace changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
bryckbost committed Sep 28, 2011
1 parent 904c2c2 commit 2b7eec5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/delayed/backend/base.rb
Expand Up @@ -4,7 +4,7 @@ module Base
def self.included(base)
base.extend ClassMethods
end

module ClassMethods
# Add a job to the queue
def enqueue(*args)
Expand Down Expand Up @@ -126,17 +126,17 @@ def reschedule_at
def max_attempts
payload_object.max_attempts if payload_object.respond_to?(:max_attempts)
end

def fail!
update_attributes(:failed_at => self.class.db_time_now)
end

protected

def set_default_run_at
self.run_at ||= self.class.db_time_now
end

# Call during reload operation to clear out internal state
def reset
@payload_object = nil
Expand Down
4 changes: 2 additions & 2 deletions lib/delayed/backend/shared_spec.rb
Expand Up @@ -27,14 +27,14 @@ def create_job(opts = {})
job = described_class.create(:payload_object => ErrorJob.new, :run_at => later)
job.run_at.should be_within(1).of(later)
end

describe "#reload" do
it 'should cause the payload to be reloaded' do
job = described_class.enqueue :payload_object => SimpleJob.new
job.payload_object.object_id.should_not == job.reload.payload_object.object_id
end
end

describe "enqueue" do
context "with a hash" do
it "should raise ArgumentError when handler doesn't respond_to :perform" do
Expand Down

0 comments on commit 2b7eec5

Please sign in to comment.