lib/que/job_methods.rb
def _run(args: nil, kwargs: nil, reraise_errors: false)
      if args.nil? && que_target
        args = que_target.que_attrs.fetch(:args)
      end

      if kwargs.nil? && que_target
        kwargs = que_target.que_attrs.fetch(:kwargs)
      end

      run(*args, **kwargs)
      default_resolve_action if que_target && !que_target.que_resolved
    rescue => error
      raise error unless que_target

      que_target.que_error = error

      run_error_notifier =
        begin
          handle_error(error)
        rescue => error_2
          Que.notify_error(error_2, que_target.que_attrs)
          true
        end

      Que.notify_error(error, que_target.que_attrs) if run_error_notifier
      retry_in_default_interval unless que_target.que_resolved

      raise error if reraise_errors
    end
# Run the job with error handling and cleanup logic. Optionally support
# overriding the args, because it's necessary when jobs are invoked from
# ActiveJob.
Run the job with error handling and cleanup logic. Optionally support
overriding the args, because it's necessary when jobs are invoked from
ActiveJob.
Run the job with error handling and cleanup logic . Optionally support overriding the args because it ' s necessary when jobs are invoked from ActiveJob .
def _run(args: nil, kwargs: nil, reraise_errors: false)
      if args.nil? && que_target
        args = que_target.que_attrs.fetch(:args)
      end
      if kwargs.nil? && que_target
        kwargs = que_target.que_attrs.fetch(:kwargs)
      end
      run(*args, **kwargs)
      default_resolve_action if que_target && !que_target.que_resolved
    rescue => error
      raise error unless que_target
      que_target.que_error = error
      run_error_notifier =
        begin
          handle_error(error)
        rescue => error_2
          Que.notify_error(error_2, que_target.que_attrs)
          true
        end
      Que.notify_error(error, que_target.que_attrs) if run_error_notifier
      retry_in_default_interval unless que_target.que_resolved
      raise error if reraise_errors
    end
def _run ( args : nil , kwargs : nil , reraise_errors : false ) if args . nil? && que_target args = que_target . que_attrs . fetch ( :args ) end if kwargs . nil? && que_target kwargs = que_target . que_attrs . fetch ( :kwargs ) end run ( * args , ** kwargs ) default_resolve_action if que_target && ! que_target . que_resolved rescue => error raise error unless que_target que_target . que_error = error run_error_notifier = begin handle_error ( error ) rescue => error_2 Que . notify_error ( error_2 , que_target . que_attrs ) true end Que . notify_error ( error , que_target . que_attrs ) if run_error_notifier retry_in_default_interval unless que_target . que_resolved raise error if reraise_errors end
Run the job with error handling and cleanup logic.
Run the job with error handling and cleanup logic .
args
kwargs
reraise_errors