]>
git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/models/job.js
3 const values
= require('lodash/values')
5 const constants
= require('../initializers/constants')
7 // ---------------------------------------------------------------------------
9 module
.exports = function (sequelize
, DataTypes
) {
10 const Job
= sequelize
.define('Job',
13 type: DataTypes
.ENUM(values(constants
.JOB_STATES
)),
17 type: DataTypes
.STRING
,
40 // ---------------------------------------------------------------------------
42 function listWithLimit (limit
, state
, callback
) {
53 return this.findAll(query
).asCallback(callback
)