process(id, type, jobParams, options = {}) {
    log('added new job %s %o %o', type, jobParams, options)
    const {
      priority = Job.priority.LOW,
      maxAge = this.options.maxAge,
      onSuccess = () => {},
      onFailure = () => {},
    } = options
    this.pruneQueue()

    return new Promise((resolve, reject) => {
      // If a job with the given id already exists,
      // just add the success / failure callbacks to
      // that existing job (dedup)
      if (this.hasJob(id, type)) {
        log('job id %s already present, adding callbacks', id)
        this.addListenersToJob(id, type, { resolve, reject })
        return
      }

      this.jobs.push({
        id,
        type,
        maxAge,
        priority,
        addedTime: new Date(),
        status: Job.status.READY,
        params: jobParams,
        successListeners: [resolve, onSuccess],
        failureListeners: [reject, onFailure],
      })

      this.executeNextJobIfPossible()
    })
  }
@param id
@param type
@param jobParams
@param options
@return {Promise<any>}