Skip to content

Job.getCleanCopy

Grant Carthew edited this page Aug 16, 2016 · 11 revisions

cleanCopy

Type: object getter

Returns:_ A JavaScript Object populated with the properties of the job.

This method is mostly used within the rethinkdb-job-queue to save the jobs to the database. You can use this method if you want a copy of the job properties.

The returned job object has all methods and the reference to the owning Queue removed leaving only the jobs properties. The job.priority value will be converted to a string rather than the integer saved in the database.

const Queue = require('rethinkdb-job-queue')
const queue = new Queue(options)

const job = queue.createJob({ job:data })
const cleanCopy = job.cleanCopy

Main

How It Works

Contributing

API

Queue Methods

Queue Properties

Queue Events

Job Methods

Job Properties

Documentation

Clone this wiki locally