Permalink
Browse files

Don't barf if the job doesn't exist.

  • Loading branch information...
1 parent f1c14a4 commit d2c9803bf142befacb806501fc8cd96eba775f08 Keith Rarick committed Jul 21, 2008
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/beanstalk-client/job.rb
@@ -53,15 +53,15 @@ def put_back(pri=self.pri, delay=0, ttr=self.ttr)
@conn.put(body, pri, delay, ttr)
end
- def release(newpri=pri, delay=0)
+ def release(newpri=nil, delay=0)
return if !@reserved
- @conn.release(id, newpri, delay)
+ @conn.release(id, newpri || pri, delay)
@reserved = false
end
- def bury(newpri=pri)
+ def bury(newpri=nil)
return if !@reserved
- @conn.bury(id, newpri)
+ @conn.bury(id, newpri || pri)
@reserved = false
end

0 comments on commit d2c9803

Please sign in to comment.