Sha256: 80155eda64ca66d5209711e9394f836672ec5d6bbdbdb4aeee67e5f8a397d281
Contents?: true
Size: 660 Bytes
Versions: 4
Compression:
Stored size: 660 Bytes
Contents
module EM class Beanstalk class Job attr_reader :id, :conn attr_accessor :body, :ttr, :priority, :delay def initialize(conn, id, body) @conn = conn @id = id && Integer(id) @body = body @priority = conn && conn.default_priority @delay = conn && conn.default_delay @ttr = conn && conn.default_ttr end alias_method :jobid, :id def delete(&block) conn.delete(self, &block) end def stats(&block) conn.stats(:job, self, &block) end def to_s "#{id} -- #{body.inspect}" end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
em-beanstalk-0.0.9 | lib/em-beanstalk/job.rb |
em-beanstalk-0.0.8 | lib/em-beanstalk/job.rb |
em-beanstalk-0.0.7 | lib/em-beanstalk/job.rb |
em-beanstalk-0.0.6 | lib/em-beanstalk/job.rb |