Sha256: 6b1fd9f0207846882634d6b2f08509be3586334589224bd0ff6e5ffb953af57c
Contents?: true
Size: 859 Bytes
Versions: 28
Compression:
Stored size: 859 Bytes
Contents
module Backburner module Workers class Simple < Worker # Used to prepare job queues before processing jobs. # Setup beanstalk tube_names and watch all specified tubes for jobs. # # @raise [Beaneater::NotConnected] If beanstalk fails to connect. # @example # @worker.prepare # def prepare self.tube_names.map! { |name| expand_tube_name(name) }.uniq! log_info "Working #{tube_names.size} queues: [ #{tube_names.join(', ')} ]" # self.connection.tubes.watch!(*self.tube_names) end # Starts processing new jobs indefinitely. # Primary way to consume and process jobs in specified tubes. # # @example # @worker.start # def start prepare loop { work_one_job } end end # Basic end # Workers end # Backburner
Version data entries
28 entries across 28 versions & 1 rubygems