-
Notifications
You must be signed in to change notification settings - Fork 16
Job.dateFinished
Grant Carthew edited this page Oct 1, 2016
·
4 revisions
Get: Date
- Returns a JavaScript Date object representing when the job processing failed or completed.
Example:
const Queue = require('rethinkdb-job-queue')
const q = new Queue()
let job = q.createJob()
q.addJob(job).then(() => {
return q.getJob(job.id)
}).then((savedJobs) => {
// savedJobs[0].dateFinished === The date the job processing failed or completed
}).catch(err => console.error(err))
The Job.dateFinished
value can be updated when one of the following occurs.
- The job completes successfully.
- The job fails with job retries available.
- The job fails with no job retries or no more job retries.
Once a job is done and dusted its status in the queue database table will be either completed
, cancelled
, or terminated
. A job in this state is considered to be finished.
Depending on the removeFinishedJobs
Queue Master option, the Job.dateFinished
value is used to determine if the job should be removed from the database. Specifically if removeFinishedJobs
is set to a Number
and not disabled.
See the Queue Options and Queue Master documents for more detail.
- Introduction
- Tutorial
- Queue Constructor
- Queue Connection
- Queue Options
- Queue PubSub
- Queue Master
- Queue Events
- State Document
- Job Processing
- Job Options
- Job Status
- Job Retry
- Job Repeat
- Job Logging
- Job Editing
- Job Schema
- Job Name
- Complex Job
- Delayed Job
- Cancel Job
- Error Handling
- Queue.createJob
- Queue.addJob
- Queue.getJob
- Queue.findJob
- Queue.findJobByName
- Queue.containsJobByName
- Queue.cancelJob
- Queue.reanimateJob
- Queue.removeJob
- Queue.process
- Queue.review
- Queue.summary
- Queue.ready
- Queue.pause
- Queue.resume
- Queue.reset
- Queue.stop
- Queue.drop
- Queue.Job
- Queue.host
- Queue.port
- Queue.db
- Queue.name
- Queue.r
- Queue.id
- Queue.jobOptions [R/W]
- Queue.changeFeed
- Queue.master
- Queue.masterInterval
- Queue.removeFinishedJobs
- Queue.running
- Queue.concurrency [R/W]
- Queue.paused
- Queue.idle
- Event.ready
- Event.added
- Event.updated
- Event.active
- Event.processing
- Event.progress
- Event.log
- Event.pausing
- Event.paused
- Event.resumed
- Event.completed
- Event.cancelled
- Event.failed
- Event.terminated
- Event.reanimated
- Event.removed
- Event.idle
- Event.reset
- Event.error
- Event.reviewed
- Event.detached
- Event.stopping
- Event.stopped
- Event.dropped
- Job.setName
- Job.setPriority
- Job.setTimeout
- Job.setDateEnable
- Job.setRetryMax
- Job.setRetryDelay
- Job.setRepeat
- Job.setRepeatDelay
- Job.updateProgress
- Job.update
- Job.getCleanCopy
- Job.addLog
- Job.getLastLog