How to use the aerospike.scanPriority function in aerospike

To help you get started, we’ve selected a few aerospike examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aerospike / aerospike-client-nodejs / examples / scan.js View on Github external
function buildScanOptions (argv) {
  const options = {
    percent: argv.percent,
    concurrent: argv.concurrent
  }

  let priority
  switch ((argv.priority || '').toUpperCase()) {
    case 'LOW':
      priority = Aerospike.scanPriority.LOW
      break
    case 'MEDIUM':
      priority = Aerospike.scanPriority.MEDIUM
      break
    case 'HIGH':
      priority = Aerospike.scanPriority.HIGH
      break
    case 'auto':
      priority = Aerospike.scanPriority.AUTO
      break
  }
  if (priority) {
    options.priority = priority
  }

  console.info(options)