def work_one_job(conn = connection)
      begin
        job = reserve_job(conn)
      rescue Beaneater::TimedOutError => e
        return
      end

      self.log_job_begin(job.name, job.args)
      job.process
      self.log_job_end(job.name)

    rescue Backburner::Job::JobFormatInvalid => e
      self.log_error self.exception_message(e)
    rescue => e # Error occurred processing job
      self.log_error self.exception_message(e) unless e.is_a?(Backburner::Job::RetryJob)

      unless job
        self.log_error "Error occurred before we were able to assign a job. Giving up without retrying!"
        return
      end

      # NB: There's a slight chance here that the connection to beanstalkd has
      # gone down between the time we reserved / processed the job and here.
      num_retries = job.stats.releases
      max_job_retries = resolve_max_job_retries(job.job_class)
      retry_status = "failed: attempt #{num_retries+1} of #{max_job_retries+1}"
      if num_retries < max_job_retries # retry again
        retry_delay = resolve_retry_delay(job.job_class)
        delay = resolve_retry_delay_proc(job.job_class).call(retry_delay, num_retries) rescue retry_delay
        job.retry(num_retries + 1, delay)
        self.log_job_end(job.name, "#{retry_status}, retrying in #{delay}s") if job_started_at
      else # retries failed, bury
        job.bury
        self.log_job_end(job.name, "#{retry_status}, burying") if job_started_at
      end

      handle_error(e, job.name, job.args, job)
    end
Performs a job by reserving a job from beanstalk and processing it

@example
@worker.work_one_job
@raise [Beaneater::NotConnected] If beanstalk fails to connect multiple times.